l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
April 21: Google Glass
Next Installfest:
TBD
Latest News:
Mar. 18: Google Glass at LUGOD's April meeting
Page last updated:
2010 Aug 24 00:45

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] a "Bus Error" C++ issue, platform, compiler or STL?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] a "Bus Error" C++ issue, platform, compiler or STL?



Hai Yi wrote:
> Hello All:
>
> I'm on a C++ project and have been strugling with an "Bus Error" issue
> for a couple of weeks. I used dbx to debug the code and here is the
> stack:
>
> ...
> ficc_trade_leg::set_trailer1(const string& arg)
> df_string_tuple::df_string_tuple(0x1ae5180, 0xffbea53c, 0xfd578ac0,
> 0x0, 0x18, 0x0)
> basic_string,allocator>::basic_string,allocator>(0x1ae518c,
> 0xfd578ac0, 0xffbea540, 0xff3de7a8, 0x0, 0x5)
> string_ref,allocator>::references(0xba7bfff, 0x0, 0x8, 0xfb9c1e54, 0x0, 0x0)
>
>
> set_trailer1 is creating an instance of df_string_tuple, whose
> constructor looks like
>
> df_string_tuple::df_string_tuple(const df_tag& Tag, const string&
> Value): df_tuple(Tag), Value_(Value)
> {}
>
> It seems to me that debugger nailed down to the 2nd parameter of the
> above constructor. Isn't it more likely an issue of Solaris patch, C++
> compiler or STL lib rather than a coding issue?
>
> My platform is SunOS 5.8, not sure about the STL lib or CC compiler.
>
> Thanks to all suggestions and ideas,
> Hai
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>   
I am not sure I understand the format your debugger is presenting the 
traceback in, but in general a bus error means there was an attempt to 
access a multibyte value such as an integer or pointer value using a 
non-aligned pointer value. I see a value 0xba7bfff in the last traceback 
line, which could mean that the memory used by the string allocator for 
keeping track of allocations has been corrupted. I would try to find the 
origin of that odd value (set a watchpoint earlier in the program?). It 
is possible that the compiler has problems, but unlikely compared to 
prior memory corruption.

_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.