Przemek:

>Just like David. He also removed -bt

Not.
-bt should be present
Which I removed was osn, value used in message:
  "creating a (osn) executable"
by default is OS/2

>> changed -5 to -5r because -5 is for 16bit code.

>I think it does not cause any difference when wpp386 is used but of
>course it's cleaner and we should update these switches.

In 32bt -5 default to -5r

>Thank you very much. It's possible that -sg helps indirectly because
>it has to interact with the stack structure and generated code which
>may also change the code generate to call KBD16CHARIN(). As we can see
>in GCC code you sent it needs special calling convention.

>If possible I'd like to ask you and David to check if -sg is enough.
>Both switches interacts with calling convention and function
>encapsulation so it will be good to know which one helps to resolve the >problem.

Perhaps you skipped my previous message
"the problem" is resolved just removing "-s" flag

Using "-sg" can be used or not and does not interfere with "the problem"
But -sg cause an interesting behaviour trying to manage stack size, is OS dependant snd perhaps is unuseful because you are setting stack size for threads except 1 by mean of _beginthread() I included -sg info, review it and perhaps you can clarify if we should/need to use or not

>The size of stack is less important in this tests though for such
>small stack (<=64KB) it's possible that OW makes some internal
>optimizations and they are source of the problem.
>It will be good to check what will happen when bigger stack is
>allocated.

"The problem" has gone removing -s and nothing depend of stack size.
Previously I was making tests with thread-c/_beginthread() parameters values and that does not resolved GPFs

>Very nice. Thank you.
>David if possible I would like to ask you to rebuild OW OS2 Harbour
>with above switches to confirm that it also works in your environment.

I made those tests and reported them in previous message

As additional info:
OS/2 is using _beginthread() and removing -s resolv GPFs with MT
Win32 is using _beginthreadx() and is using -s but does not GPF

I requested why Win32 is using _beginthreadx() in place of _beginthread() supported by OW

--------------------------
-s flag
=======
Stack overflow checking is omitted from the generated code. By default, the compiler will emit code at the beginning of every function that checks for the "stack overflow" condition. This option can be used to disable this feature. The macro __SW_S will be predefined if "s" is selected.
--------------------------

David Macias


_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to