execve(2) man says:
EFAULT filename points outside your accessible address space.
Both execve traces differs, second argument [an arguments array] in
second execve doesn’t look the same like in first execve invocation,
it’s longer, has addidional values and … [three dots] after strings
suggesting they’re in fact probably longer [i don’t know strace
formatting rules well]. Is it something wrong with p* packing? Anybody
tried calling execve in ruby this way?
-e:1:in `syscall’: string contains null byte (ArgumentError)
from -e:1
It’s the same error when tried [‘true’, nil].pack(‘p*’), result is the
same too, it adds ‘000\000\000\000’.
Do you have patched ruby build or something? i managed to make it work
by commenting few lines from string.c responsible for above exception.
It’s the same error when tried [‘true’, nil].pack(‘p*’), result is the
same too, it adds ‘000\000\000\000’.
Do you have patched ruby build or something? i managed to make it work
by commenting few lines from string.c responsible for above exception.
regards:-)
I think you’re missing the fact that I used ‘ppi’ as the argument to
pack (NULL is an integer) and not ‘p*’.
regards,
I think you’re missing the fact that I used ‘ppi’ as the argument to
pack (NULL is an integer) and not ‘p*’.
regards,
Except that the problem is already solved [see above, pasted a link] you
seems to be missing the fact that I was saing that [‘true’,0
].pack(‘pi’) and [‘true’,nil ].pack(‘p*’) gives the same result and the
p* method is better because you don’t have to control ‘p’ count in
pack() argument.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.