in reply to Re^6: XS: free() outside of the main thread causes crash on Windows
in thread XS: free() outside of the main thread causes crash on Windows
the old "#undef free" trick
I was reluctant to mention that as I am unfamiliar with the effects in a mingw environment.
(By undeffing free, we get to call the free() that we want, not the the free() that perl defined for us.)
It would be interesting to see the /E output after doing that?
I'm guessing that it gives your the CRT free(), but that then brings up the question:
If you need the CRT free(), what/where/how was the thing being freed, allocated?
I suspect you may have been on the right lines in your other post; and the problem is that actually, the OP is freeing the wrong thing. And the fact that by doing so using the CRT free() doesn't cause a crash is simply luck.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: XS: free() outside of the main thread causes crash on Windows
by OlegG (Monk) on Sep 25, 2014 at 09:50 UTC | |
by BrowserUk (Patriarch) on Sep 25, 2014 at 10:04 UTC | |
by OlegG (Monk) on Sep 25, 2014 at 10:14 UTC | |
by BrowserUk (Patriarch) on Sep 25, 2014 at 11:20 UTC | |
|
Re^8: XS: free() outside of the main thread causes crash on Windows
by syphilis (Archbishop) on Sep 25, 2014 at 10:34 UTC | |
by BrowserUk (Patriarch) on Sep 25, 2014 at 11:26 UTC |