[Mono-devel-list] SWF Monostub and Mini
Alexandre Pigolkine
pigolkine at gmx.de
Thu May 1 07:37:01 EDT 2003
Hello,
I found that crash in SWF applications happens due to clash between
InitializeCriticalSection,EnterCriticalSection etc. functions of
Mono and Wine. The functions are part of Win32 API and Wine implements
them. At runtime, loader finds them in Wine's libraries and result
is "Segmentation fault" on the next function call.
I renamed the functions in Mono and the things look better now.
( diff file attached).
Is it possible to include this in Mono release ?
Alexandre
-------------- next part --------------
Index: mono/io-layer/critical-sections.c
===================================================================
RCS file: /cvs/public/mono/mono/io-layer/critical-sections.c,v
retrieving revision 1.5
diff -r1.5 critical-sections.c
44c44
< void InitializeCriticalSection(WapiCriticalSection *section)
---
> void InitializeCriticalSectionMono(WapiCriticalSection *section)
65c65
< InitializeCriticalSection(section);
---
> InitializeCriticalSectionMono(section);
76c76
< void DeleteCriticalSection(WapiCriticalSection *section)
---
> void DeleteCriticalSectionMono(WapiCriticalSection *section)
112c112
< gboolean TryEnterCriticalSection(WapiCriticalSection *section)
---
> gboolean TryEnterCriticalSectionMono(WapiCriticalSection *section)
136c136
< void EnterCriticalSection(WapiCriticalSection *section)
---
> void EnterCriticalSectionMono(WapiCriticalSection *section)
151c151
< void LeaveCriticalSection(WapiCriticalSection *section)
---
> void LeaveCriticalSectionMono(WapiCriticalSection *section)
Index: mono/io-layer/critical-sections.h
===================================================================
RCS file: /cvs/public/mono/mono/io-layer/critical-sections.h,v
retrieving revision 1.4
diff -r1.4 critical-sections.h
26c26,32
< extern void InitializeCriticalSection(WapiCriticalSection *section);
---
> #define InitializeCriticalSection InitializeCriticalSectionMono
> #define DeleteCriticalSection DeleteCriticalSectionMono
> #define TryEnterCriticalSection TryEnterCriticalSectionMono
> #define EnterCriticalSection EnterCriticalSectionMono
> #define LeaveCriticalSection LeaveCriticalSectionMono
>
> extern void InitializeCriticalSectionMono(WapiCriticalSection *section);
28c34
< extern void DeleteCriticalSection(WapiCriticalSection *section);
---
> extern void DeleteCriticalSectionMono(WapiCriticalSection *section);
30,32c36,38
< extern gboolean TryEnterCriticalSection(WapiCriticalSection *section);
< extern void EnterCriticalSection(WapiCriticalSection *section);
< extern void LeaveCriticalSection(WapiCriticalSection *section);
---
> extern gboolean TryEnterCriticalSectionMono(WapiCriticalSection *section);
> extern void EnterCriticalSectionMono(WapiCriticalSection *section);
> extern void LeaveCriticalSectionMono(WapiCriticalSection *section);
Index: mono/io-layer/processes.c
===================================================================
RCS file: /cvs/public/mono/mono/io-layer/processes.c,v
retrieving revision 1.12
diff -r1.12 processes.c
506c506
<
---
>
510c510
<
---
>
539c539
< gpointer GetCurrentProcess (void)
---
> gpointer GetCurrentProcessMono (void)
542c542
<
---
>
546c546
< guint32 GetCurrentProcessId (void)
---
> guint32 GetCurrentProcessIdMono (void)
550c550
<
---
>
552c552
<
---
>
565c565
<
---
>
Index: mono/io-layer/processes.h
===================================================================
RCS file: /cvs/public/mono/mono/io-layer/processes.h,v
retrieving revision 1.5
diff -r1.5 processes.h
111,112c111,114
< extern gpointer GetCurrentProcess (void);
< extern guint32 GetCurrentProcessId (void);
---
> #define GetCurrentProcess GetCurrentProcessMono
> #define GetCurrentProcessId GetCurrentProcessIdMono
> extern gpointer GetCurrentProcessMono (void);
> extern guint32 GetCurrentProcessIdMono (void);
More information about the Mono-devel-list
mailing list