[Bug 193795] Re: Printf inconsistency when handed null string

2009-05-11 Thread Andrey M
the gcc developers responded somewhat prick-like stating that it's the programmer's fault anyways the interim solution is to pass the "-fno-builtin-printf" to the compiler -- Printf inconsistency when handed null string https://bugs.launchpad.net/bugs/193795 You received this bug notification be

[Bug 193795] Re: Printf inconsistency when handed null string

2009-05-10 Thread Malcolm Parsons
> How can I do that? You could try posting to their mailing list. http://gcc.gnu.org/lists.html -- Printf inconsistency when handed null string https://bugs.launchpad.net/bugs/193795 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. --

Re: [Bug 193795] Re: Printf inconsistency when handed null string

2009-05-10 Thread Andrey M
How can I do that? On Sun, May 10, 2009 at 3:29 AM, Malcolm Parsons wrote: > I think you need to try to convince the gcc developers that this is a > bug. > > -- > Printf inconsistency when handed null string > https://bugs.launchpad.net/bugs/193795 > You received this bug notification because you

[Bug 193795] Re: Printf inconsistency when handed null string

2009-05-10 Thread Malcolm Parsons
I think you need to try to convince the gcc developers that this is a bug. -- Printf inconsistency when handed null string https://bugs.launchpad.net/bugs/193795 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing lis

[Bug 193795] Re: Printf inconsistency when handed null string

2009-05-10 Thread Andrey M
I've traced the file that does the optimization to /usr/src/gcc-4.3/gcc-4.3.3/gcc/builtins.c The functions are fold_builtin_printf() fold_builtin_sprintf() the functions return a tree that seems to point straight to some puts() or putchar() construct that return tree should be modified to incl

[Bug 193795] Re: Printf inconsistency when handed null string

2009-05-07 Thread Andrey M
I've been digging through the gcc-4.3 source, looking for where the compiler swaps printf("%s\n",str); with puts(str); but the source is huge and I have no idea where or how to find the code responsible for this. I would happily patch this, provided I can get some direction on where I can find t

[Bug 193795] Re: Printf inconsistency when handed null string

2009-05-06 Thread Andrey M
** Changed in: gcc-4.3 (Ubuntu) Status: Triaged => Confirmed -- Printf inconsistency when handed null string https://bugs.launchpad.net/bugs/193795 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubunt

[Bug 193795] Re: Printf inconsistency when handed null string

2008-09-24 Thread Malcolm Parsons
gcc optimises printf to puts. They behave differently, so the optimisation is invalid. ** Changed in: gcc-4.3 (Ubuntu) Sourcepackagename: glibc => gcc-4.3 -- Printf inconsistency when handed null string https://bugs.launchpad.net/bugs/193795 You received this bug notification because you are a m

[Bug 193795] Re: Printf inconsistency when handed null string

2008-09-08 Thread Matthias Klose
** Changed in: glibc (Ubuntu) Importance: Undecided => Low Status: New => Triaged -- Printf inconsistency when handed null string https://bugs.launchpad.net/bugs/193795 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu

[Bug 193795] Re: Printf inconsistency when handed null string

2008-03-07 Thread Robert Escriva
I agree 100% that it is the programmer's responsibility to check for null pointers and found this bug through testing of my own code. I also played around with it last night and confirm as well that my original guess at the cause of this behavior was incorrect. The only reason I reported this beh

[Bug 193795] Re: Printf inconsistency when handed null string

2008-03-07 Thread Philipp Kohlbecher
I can confirm this behaviour. I am not sure that you've correctly identified the cause, though. Looking at the disassembled machine code for both function calls, I found that 'printf("%s\n")' isn't handled by printf() at all -- the compiler inserts a call to puts() instead. puts(), in turn, calls

[Bug 193795] Re: Printf inconsistency when handed null string

2008-02-20 Thread Robert Escriva
Small correction: vfprintf.c not vprintf.c. Sorry for the typo. -- Printf inconsistency when handed null string https://bugs.launchpad.net/bugs/193795 You received this bug notification because you are a member of Ubuntu Bugs, which is the bug contact for Ubuntu. -- ubuntu-bugs mailing list u