[Bug gcov-profile/56773] Programs crash if compiled with --coverage, although they run correctly without --coverage

2013-03-28 Thread peter.hans.froehlich at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56773



peter.hans.froehlich at gmail dot com changed:



   What|Removed |Added



 CC||peter.hans.froehlich at

   ||gmail dot com



--- Comment #2 from peter.hans.froehlich at gmail dot com 2013-03-28 21:48:36 
UTC ---

I agree that open is used by the standard library for a system call. The

strange this is that in 4.2 this problem doesn't seem to occur. In 4.6 and 4.7

it does. Sorry, didn't have time to dig out more old GCC versions.


[Bug gcov-profile/56773] Programs crash if compiled with --coverage, although they run correctly without --coverage

2013-04-02 Thread peter.hans.froehlich at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56773



--- Comment #4 from peter.hans.froehlich at gmail dot com 2013-04-02 13:10:22 
UTC ---

I am fine with your decision to declare this INVALID, I'd just like to

understand the reasoning. You're saying that it's okay for code injected by gcc

to crash depending on the context in which it is injected? From the perspective

of a mere user, that seems entirely unsatisfying. After all fopen() doesn't

crash when I define a symbol called open in my code, and fopen() presumably

needs to use the open() syscall eventually just like the code injected by gcc

for --coverage does. If gcc would inject code with suitably mangled names,

wouldn't this issue disappear? (Thank you to whoever takes the time to explain

this to me. BTW, I understand *why* fopen() doesn't crash, that's not the

issue.)