Open Kalamatee opened 4 years ago
I would propose the following change(s) to address this -:
I believe it is also the source of these "warnings" that are shown when AROS boots on hosted -:
[hostlib:unix] Opening 'libXcursor.so.1' [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". warning: Corrupted shared library list: 0x555555768650 != 0x7ffff7ffd9f0 [hostlib:unix] opened @ 0x0x555555762490
[hostlib:unix] Opening 'libXxf86vm.so.1' warning: Corrupted shared library list: 0x5555557bab30 != 0x555555768650 warning: Corrupted shared library list: 0x5555557bab30 != 0x555555768650 [hostlib:unix] opened @ 0x0x555555769100
0x7ffff7ffd9f0 appears to be in the host process stack, while all the other addresses are within the memory that has been allocated for AROS.
Is there anything left to do here?
Yes.. some mechanism needs implemented to interface between the host task when it's running in the context of AROS, and when AROS calls host functionality. All existing drivers, etc, doing this would need adapted.
On hosted, AROS uses signals to alter the host processes hardware context, so that the currently running AROS tasks stack/PC, etc, is used.
The problem is drivers, or any other code that calls functions on the host OS, do not switch out the AROS tasks stack when performing the operations and so call code written for the host operating system still with the running AROS tasks stack used. Since the host does not know how to work with our stack, undesirable things can occur.
HostGL is a prime example. Depending on the GL driver the host is actually using, either unpredictable behavior occurs or memory gets trashed in AROS due to functions using more stack than AROS provides.