Menu

#2 segmentation fault on x86_64

open
nobody
None
5
2009-10-28
2009-10-28
Anonymous
No

there is a bug in embUnit/stdImpl.c - code assumes unsigned long is max 32 bit long, which is not true in general. C/C++ specification says only that sizeof(int)<=sizeof(long) - nothing more. if you expect unsigned type, 32-bits-long use uint32_t instead (#include <stdint.h>).

fix for this requires addition of 'stdint.h' header and changing 'unisgned long' to 'unit32_t' in embUnit/stdImpl.c in functions _xtoa() (line 113) and stdimpl_itoa() (lines 140 and 142).

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.