This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author alexandre.vassalotti
Recipients alexandre.vassalotti, vstinner
Date 2014-01-29.01:11:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390957877.21.0.877893583204.issue20428@psf.upfronthosting.co.za>
In-reply-to
Content
> What is the current behaviour?

I don't think the behaviour is defined. At least, I know it causes recent GCC/glibc combination to throw a compilation error when _FORTIFY_SOURCE is defined:
 
http://www.eglibc.org/cgi-bin/viewvc.cgi/trunk/libc/io/open_2.c?view=markup

For example, this is the error I got when I tried to compile Python with LTO:

gcc-4.6 -pthread -flto -fuse-linker-plugin  -Xlinker -export-dynamic -o python Modules/python.o libpython3.4m.a -lpthread -ldl -lutil -lm  
bytesobject.o (symbol from plugin): warning: memset used with constant zero length parameter; this could be due to transposed parameters
In file included from ./Modules/_localemodule.c:404:0,
                 from :459:
/usr/include/x86_64-linux-gnu/bits/fcntl2.h: In function ‘_Py_open’:
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:51:24: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
lto-wrapper: gcc-4.6 returned 1 exit status
/usr/bin/ld: lto-wrapper failed
collect2: ld returned 1 exit status
History
Date User Action Args
2014-01-29 01:11:17alexandre.vassalottisetrecipients: + alexandre.vassalotti, vstinner
2014-01-29 01:11:17alexandre.vassalottisetmessageid: <1390957877.21.0.877893583204.issue20428@psf.upfronthosting.co.za>
2014-01-29 01:11:17alexandre.vassalottilinkissue20428 messages
2014-01-29 01:11:16alexandre.vassalotticreate