mozilla :: #ionmonkey

17 Mar 2017
11:10bbouvierhow bad is it if i use a masm while there's no JitContext on the stack? jandem / h4writer ?
11:13h4writerdo you mean masm generated code? Or using the MacroAssembler?
11:13h4writerFor the first I don't really have an anwser. For the second it should just work, right?
11:16bbouvierh4writer: using the macro assembler, yes
11:16bbouvierit just works, except when it has assertions that require a JitContext :)
11:16bbouvierhttp://searchfox.org/mozilla-central/source/js/src/jit/shared/Assembler-shared.h#175
11:17bbouvierand it's too bad, because i'm compiling in wasm, but for my precise case i don't care about having a JitContext at all
11:17bbouvier(and i don't use symbolic addresses, so i can just use an imm pointer anyway)(
11:17h4writerthat assert is just to make sure people use ImmGCPtr for ion
11:18h4writer*scratch that
11:18bbouvierh4writer: also for ImmPtr
11:18nbpbbouvier: isn't the executable allocator part of the JitContext?
11:18bbouviernbp: aren't you on PTO ? :D
11:19bbouviernbp: no, it's on the JitRuntime*
11:19bbouviermany structures, much confusion, wow
11:19h4writerbbouvier: IIUC this is just an assert to make sure that we don't do something specific in one engine
11:20bbouvierh4writer: right; i'd like to use it in a place where this assertion doesn't apply, but this means creating a new UncheckedImmPtr type, and masm variants, which is a bit unfortunate
11:23h4writerbbouvier: oh interesting, we indeed always create a JitContext before using MacroAssembler
11:23h4writerbbouvier: and why can't you use one yourself?
11:24bbouvierh4writer: well i could create one, but i don't have any scripts at this point, so IsCompilingWasm() would return true
11:24bbouvierh4writer: and i am in a situation where i *can* safely use an immediate pointer, because it's for one optimization that's happening at instantiation time (after compilation)
11:25bbouvieron the main active thread
11:25h4writerbbouvier: in that case you will indeed have to make a "uncheckedImmPtr"
11:26bbouvierright, and all the masm per_arch variants :( so much boilerplate
11:26bbouvierlet's just merge all the masm files into one
11:34bbouvierand overloads of addPendingJump too, yuck
11:39bbouvierfound another idea: add a special ctor to ImmPtr that takes a special dummy argument signaling there won't be any check (the same way we have the WasmToken in the masm ctor)
11:43bbouvierso something like this: https://benj.me/pub/nochecktoken.txt
15:04sstanglhas anyone looked at the pwn2own vuln? I don't have credentials to see the bug.
15:09bbouviersstangl: i just heard it was in gfx, but that's it
15:31decoderit's not JS related at all this time
15:31decoder:)
17:01h4writersstangl: it wasn't us this time ;)
18 Mar 2017
No messages
   
Last message: 103 days and 18 hours ago