This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Program that segfaults with -Ofast


On 05/01/2018 12:58, Christer Solskogen wrote:

> I'm not sure why the developer chose -Ofast. It was not my decision.

When the dust settles, I think he should "revert" to -O3, or even to -O2.

> ==7821== Conditional jump or move depends on uninitialised value(s)
> ==7821==    at 0x29478C: read_kickstart (memory.cpp:581)
> ==7821==    by 0x29478C: read_kickstart_version(uae_prefs*) (memory.cpp:1151)
> ==7821==    by 0x28E243: fixup_prefs(uae_prefs*, bool) (main.cpp:195)
> ==7821==    by 0x1AB34F: cfgfile_load(uae_prefs*, char const*, int*, int, int) (cfgfile.cpp:3969)
> ==7821==    by 0x2F593B: target_cfgfile_load(uae_prefs*, char const*, int, int) (amiberry.cpp:527)
> ==7821==    by 0x28F927: parse_cmdline_and_init_file (main.cpp:608)
> ==7821==    by 0x28F927: real_main2 (main.cpp:686)
> ==7821==    by 0x28F927: real_main(int, char**) (main.cpp:784)
> ==7821==    by 0x151D97: main (amiberry.cpp:920)
> ==7821==
> ==7821== Conditional jump or move depends on uninitialised value(s)
> ==7821==    at 0x29479C: read_kickstart (memory.cpp:584)
> ==7821==    by 0x29479C: read_kickstart_version(uae_prefs*) (memory.cpp:1151)
> ==7821==    by 0x28E243: fixup_prefs(uae_prefs*, bool) (main.cpp:195)
> ==7821==    by 0x1AB34F: cfgfile_load(uae_prefs*, char const*, int*, int, int) (cfgfile.cpp:3969)
> ==7821==    by 0x2F593B: target_cfgfile_load(uae_prefs*, char const*, int, int) (amiberry.cpp:527)
> ==7821==    by 0x28F927: parse_cmdline_and_init_file (main.cpp:608)
> ==7821==    by 0x28F927: real_main2 (main.cpp:686)
> ==7821==    by 0x28F927: real_main(int, char**) (main.cpp:784)
> ==7821==    by 0x151D97: main (amiberry.cpp:920)
> ==7821==
> ==7821== Invalid read of size 4
> ==7821==    at 0x28E2AC: fixup_prefs(uae_prefs*, bool) (main.cpp:207)
> ==7821==    by 0x1AB34F: cfgfile_load(uae_prefs*, char const*, int*, int, int) (cfgfile.cpp:3969)
> ==7821==    by 0x2F593B: target_cfgfile_load(uae_prefs*, char const*, int, int) (amiberry.cpp:527)
> ==7821==    by 0x28F927: parse_cmdline_and_init_file (main.cpp:608)
> ==7821==    by 0x28F927: real_main2 (main.cpp:686)
> ==7821==    by 0x28F927: real_main(int, char**) (main.cpp:784)
> ==7821==    by 0x151D97: main (amiberry.cpp:920)
> ==7821==  Address 0x29bb8 is not stack'd, malloc'd or (recently) free'd

I just don't see read_kickstart_version() anywhere in the source code.
Are you using https://github.com/midwan/amiberry.git ?
Precisely what commit are you using => b791d1d0acb7? 97f180ec9fef? other?

What do you have at main.cpp:line195 and memory.cpp:line1151 ?
What about memory.cpp:line581 and memory.cpp:line584 ?

I don't see anything relevant there.
I'm starting to think I'm not looking at the correct source code :-)
I don't think O3 messes line numbering that bad.

Regards.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]