Ok, they've confirmed it's a bug in the JS engine -- larger SharedArrayBuffer objects had a different signature, breaking the checks, while short buffers still passed in whatever automatic tests they might have had.
Should get fixed somewhere down the line. :) -- brion On Mar 10, 2017 1:06 PM, "Brion Vibber" <[email protected]> wrote: > On Mar 10, 2017 5:51 AM, "Jukka Jylänki" <[email protected]> wrote: > > Haven't tried out Edge at all with asm.js SharedArrayBuffer yet. I wonder > if it fails in smaller test cases already of this pattern? > > > Testing more carefully... Yes it fails right out in a simple test case, > might be a regression or maybe it never worked. :) > > I've reported upstream; supposedly the right place for JS engine issues is > straight to the ChakraCore github: https://github.com/ > Microsoft/ChakraCore/issues/2672 > > -- brion > > > 2017-03-10 5:37 GMT+02:00 Brion Vibber <[email protected]>: > >> Whoops, forgot my sample URL to reproduce: >> >> https://brionv.com/misc/ogv.js/demo-mt/#file=Knowledge_for_E >> veryone_(short_cut).webm&player=js-mt&size=480p.vp9.webm&sou >> rce=shortlist-vp9 >> >> (Only the VP9 decoder has the multithread mode and I'm seeing good >> results, though it currently blocks the main thread during decoding I can >> easily fix that. And it's a little... hang-y sometimes, possibly due to not >> waiting on thread creation if the thread pool fills up.) >> >> -- brion >> >> On Thu, Mar 9, 2017 at 7:29 PM, Brion Vibber <[email protected]> wrote: >> >>> Is Edge known to be working (or broken) with emscripten's pthreads mode? >>> >>> I've got libvpx running multithreaded in ogv.js on Safari Tech Preview >>> and Firefox Dev Edition, but am having some trouble with Edge in the >>> current Windows Insider build (15048). (Have to enable 'Experimental JS >>> features' in about:flags to get Atomics and SharedArrayBuffer.) >>> >>> It's throwing an error "SCRIPT5664: The operation is not supported on >>> this typed array type" in the initMainThreadBlock function from >>> library_pthread.js, on this line: >>> >>> Atomics.store(HEAPU32, (PThread.mainThreadBlock + {{{ >>> C_STRUCTS.pthread.tsd }}} ) >> 2, tlsMemory); // Init thread-local-storage >>> memory array. >>> >>> As far as I can tell it should be working; HEAPU32 is a Uint32Array, its >>> buffer is a SharedArrayBuffer instance, and the memory locations seem in >>> line with what's expected. >>> >>> The Atomics implementation in Edge's JS engine is at >>> https://github.com/Microsoft/ChakraCore/blob/master/lib/Runt >>> ime/Library/AtomicsObject.cpp and I don't see anything obviously >>> surprising in the source, though it could conceivably be out of sync. Nor >>> do I encounter the error if I just instantiate a SharedArrayBuffer and a >>> Uint32Array and call Atomics.store on it. >>> >>> It's possible I've broken something in my modularization fixes that >>> doesn't break in the other browsers... >>> >>> Thanks! >>> >>> -- brion >>> >> >> -- >> 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 [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. > > > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
