On Sat, Apr 20, 2013 at 1:38 AM, Dan Kegel <d...@kegel.com> wrote: >> I tried explicitly add 'inline' to every static functions in hook.c >> but complie with -O0, to see if the bug can be reproduced in this way, >> but nothing happen, this make me doubt being inline is not the >> culprit. > > call_hook_proc is probably the only function whose inlining matters > for this problem (since my patch solved your problem at -O2). > > (inline is only a hint. FORCEINLINE is stronger.)
Thanks Dan and André, I tried FORCEINLINE and tried bisect on gcc flags to reproduce the bug but failed with strange gcc behaviors, then Dan had worked out an actual fix for this bug, what I learned is, understanding the real bug seems faster than playing with gcc flags... Anyway, thanks Dan and André as always! -- Regards, Qian Hong - http://www.winehq.org