Program will crash after using gcov
Nan Xiao
xiaonan830818@gmail.com
Fri Sep 26 00:32:00 GMT 2014
Hi Brian,
Thanks very much for your kind response!
The root cause of this issue is using `-fpack-struct=4` compile
option on 64-bit Linux. For detailed information, we can refer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43341.
Best Regards
Nan Xiao
On Thu, Sep 25, 2014 at 10:39 PM, Brian Budge <brian.budge@gmail.com> wrote:
> On Wed, Sep 24, 2014 at 9:31 PM, Nan Xiao <xiaonan830818@gmail.com> wrote:
>>
>> ......
>> size_t filename_length = strlen(info->filename);
>> ......
>>
>> I can see the root cause is the "info->filename" is invalid (After
>> disassembling the code, the address is 0x57c4ac00000000, and it is
>> indeed invalid).
>>
>> I don't know how to analyse this bug, could anyone give any clues?
>> Thanks very much in advance!
>>
>
> I would consider using valgrind or address-sanitizer/memory-sanitizer
> to track down your bug. Note that the latter two options require a
> fairly recent version of gcc or clang.
--
Best Regards
Nan Xiao
More information about the Gcc-help
mailing list