> Nothing new until now. But lets look at that code with the right library in place:
>
> 0x41d5d15c <cti_op_get_by_id_proto_fail+8>:
> ldr lr, [sp, #3118288] ; 0x40
> 0x41d5d160 <cti_op_get_by_id_proto_fail+12>: mov pc, lr
> 0x41d5d164 <cti_op_get_by_id_array_fail>:
> str lr, [sp, #3118288] ; 0x40
> 0x41d5d168 <cti_op_get_by_id_array_fail+4>: bl 0x41cae2e8
>
> This looks suspicious. Does it tell you anything?
Yeah it is really suspicious. The sequence should look like this:
In other words, something added 8 to the offset of these so called "stubs". Same as the second function. Question is why... Perhaps a very simple web page with simple JS with calling fallbacks like could also reveal this error:
No problem. This is entirely different now.
> Nothing new until now. But lets look at that code with the right library in place: get_by_ id_proto_ fail+8> : get_by_ id_proto_ fail+12> : mov pc, lr get_by_ id_array_ fail>: get_by_ id_array_ fail+4> : bl 0x41cae2e8
>
> 0x41d5d15c <cti_op_
> ldr lr, [sp, #3118288] ; 0x40
> 0x41d5d160 <cti_op_
> 0x41d5d164 <cti_op_
> str lr, [sp, #3118288] ; 0x40
> 0x41d5d168 <cti_op_
>
> This looks suspicious. Does it tell you anything?
Yeah it is really suspicious. The sequence should look like this:
str lr, [sp, ...]
bl ...
ldr lr, [sp, ...]
mov pc, lr
Generated by:
#define DEFINE_ STUB_FUNCTION( rtype, op) \ ##op(STUB_ ARGS_DECLARATIO N); \ STRING( cti_##op) "\n" \
SYMBOL_ STRING( cti_##op) ":" "\n" \ VALUE_OF( THUNK_RETURN_ ADDRESS_ OFFSET) "]" "\n" \ STRING( JITStubThunked_ ##op) "\n" \ VALUE_OF( THUNK_RETURN_ ADDRESS_ OFFSET) "]" "\n" \ ##op(STUB_ ARGS_DECLARATIO N)
extern "C" { \
rtype JITStubThunked_
}; \
asm ( \
".globl " SYMBOL_
"str lr, [sp, #" STRINGIZE_
"bl " SYMBOL_
"ldr lr, [sp, #" STRINGIZE_
"mov pc, lr" "\n" \
); \
rtype JITStubThunked_
and
#define THUNK_RETURN_ ADDRESS_ OFFSET 0x38
(so #3118288 is somewhat way too big for me)
In other words, something added 8 to the offset of these so called "stubs". Same as the second function. Question is why... Perhaps a very simple web page with simple JS with calling fallbacks like could also reveal this error:
<script>
var a = {}; a["a"]=5;
</script>