AlexAltea / capstone.js

Capstone disassembler framework for JavaScript
https://alexaltea.github.io/capstone.js/
BSD 3-Clause "New" or "Revised" License
172 stars 28 forks source link

broken on firefox and safari? #3

Closed m4b closed 9 years ago

m4b commented 9 years ago

UPDATE:

looks like this is caused by minification (I'm using capstone.min.js, because couldn't compile from source):

https://github.com/vibornoff/asmcrypto.js/issues/82

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

I've got another issue for you ;)

This might be resolved, if as you said, the latest version gets recompiled with the latest capstone and emscripten, but for now I'm getting this localized error in FF:

TypeError: asm.js type error: expecting argument type declaration for 'a' of the form 'arg = arg|0' or 'arg = +arg' or 'arg = fround(arg)'

It also doesn't seem to run in safari, but no console errors. This could be an issue with how I'm using the library however.

Anyway, something to be aware of, as for now this only seems to work on Chrome for me, which isn't so great.

I will update this with more information if I find some.

AlexAltea commented 9 years ago

Confirmed. In the case of Firefox, this is just a warning and the library can still be used without further issues. Using the unminified version capstone.js it still throws different TypeError's, so there is nothing I can do to completely fix this. The case of Safari baffles me. Could you please try with the new unminified version linked above?

Probably, in the long-term, the most sane thing to do is wait for WebAssembly to be supported in all major browsers and can forget about this asm.js insanity and including 6 MB JavaScript files.

m4b commented 9 years ago

@AlexAltea :+1: WebAssembly.

Until that glorious day though, I'll test with the unminified version, specifically with safari. But it could be a host of other unrelated issues on hindsight.

So right now silicon-disassembler is using the min version, but it's manually copied into the dir and distributed that way. I might update the bower.json to use the published bower version as a dependency, as per #2 , but I'll have to think about how that would work, or if it's an advantage, etc.

But it looks like you updated to use the latest capstone version, etc.? I assume there's no breaking changes. If not, i'll update silicon-disassembler with the latest capstone version.

Thanks for working on this :)

m4b commented 9 years ago

I apologize; it looks like this is running fine on safari, with or without the minified version.

Similarly for firefox (modulo assembly TypeError warnings); I'm closing this issue.