[Bug lto/87525] infinite loop generated for fread() if enabling -flto and -D_FORTIFY_SOURCE=2
lh_mouse at 126 dot com
gcc-bugzilla@gcc.gnu.org
Mon Oct 8 11:45:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87525
Liu Hao <lh_mouse at 126 dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |lh_mouse at 126 dot com
--- Comment #9 from Liu Hao <lh_mouse at 126 dot com> ---
I reproduced this problem on Linux Mint 19 using the last two attachments. This
issue is only reproducible on i686 i.e. after `-m32` is added into FLAGS in the
build script, as I am on an x64 system.
```
lh_mouse@lhmouse-ideapad ~/Desktop $ objdump -dMintel-mneomic libFLAC.so.8.3.0
| grep -F 'fread.constprop.5'
00002530 <fread.constprop.5>:
2530: eb fe jmp 2530 <fread.constprop.5>
2c4e: e8 dd f8 ff ff call 2530 <fread.constprop.5>
8204: e8 27 a3 ff ff call 2530 <fread.constprop.5>
8b4e: e8 dd 99 ff ff call 2530 <fread.constprop.5>
lh_mouse@lhmouse-ideapad ~/Desktop $ gcc --version
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
lh_mouse@lhmouse-ideapad ~/Desktop $
```
More information about the Gcc-bugs
mailing list