I explored this area in the repository by writing a stress test code for realloc + wasm workers + aborting malloc=0 + memory growth, which can be found in https://github.com/emscripten-core/emscripten/pull/19465/files#diff-02c8c2b081a2137723784e50ae5aedd7a2df1ac8dc3cfcb4ad6ac9eb8137f0fb , but was not able to coax out an issue.
If you are still keen, one approach might be to try to mutate that test case to look like your scenario, if you might be able to get the test to show the same issue you were seeing. On Mon, Jun 5, 2023 at 9:11 AM 'Dieter Weidenbrück' via emscripten-discuss < emscripten-discuss@googlegroups.com> wrote: > s...@google.com schrieb am Montag, 5. Juni 2023 um 04:40:26 UTC+2: > > > Your results for pthreads look rather odd, so something strange must be > going on. In terms of performance there should be very little difference > between wasm workers and pthreads if you implement the same algorithm since > they are both based on the same shared memory primitives. Most of the > differences are related to the code size. > > Agreed. Maybe there was still a flag like SAFE_HEAP enabled. I was more > focussing on getting things to work. > That leaves the strange behavior when using realloc that I can not further > test here. > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to emscripten-discuss+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/emscripten-discuss/644e2c21-042d-45a3-a132-5d56d76278e5n%40googlegroups.com > <https://groups.google.com/d/msgid/emscripten-discuss/644e2c21-042d-45a3-a132-5d56d76278e5n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CA%2B6sJ-0_ZeWGuUE7eGmif1a4XA2MCtOk45S1po%3DgZHaEF%2B%2B_TA%40mail.gmail.com.