[Bug 10273] satisfy SafeDisc 2.x heuristic API analyzer by "adjusting" API exports/entry statistics of wine builtins

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Nov 8 18:01:23 CST 2007


http://bugs.winehq.org/show_bug.cgi?id=10273





--- Comment #23 from Anastasius Focht <focht at gmx.net>  2007-11-08 18:01:23 ---
Hello,

--- snip ---
You are not by any chance running a distribution where -fstack-protector is
enabled by default? Because compiling with that makes it work, too.
--- snip ---

Not the case here. Gcc's stack smashing guard code won't solve this problem and
additionally it applies only to certain classes of functions.
Just an example, the following entry code was generated on my ix86 system with
gcc version 4.1.2 20070925 (Red Hat 4.1.2-27) and -fstack-protector:

--- snip ---
push    ebp
mov     ebp, esp
sub     esp, 48h
mov     [ebp-0Ch], ebx
call    __i686_get_pc_thunk_bx
add     ebx, 4D866h
mov     [ebp-8], esi
mov     esi, eax
mov     [ebp-30h], edx
mov     eax, large gs:14h         ; fetch random cookie from TLS
mov     [ebp-10h], eax            ; setup stack guard
xor     eax, eax                  ; clear value
...
--- snip ---

The stack cookie/guard setup code is inserted *after* PIC register load, so no
help from compiler here.

--- snip ---
btw. compiling with gcc-3.4.6 and it works right away.
--- snip ---

Thats the problem. Different gcc compiler versions, different code generation
(optimization techniques).

Regards


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list