IRC channel logs


back to list of logs

<lloda>ok to bump get_subr_stub_code arg limit from 10 to dunno, 20? wingo? civodul?
<lloda>i happen to need 11 atm but 10 seems kind of arbitrary
<lloda>looks like a pure sanity check
<wingo>that limit is historic, from when there was a static array of subr code
<lloda>hmm what about scm_apply_subr
<wingo>ah :)
<lloda>how about i just bump it to 15 and maybe find a better way later
<wingo>can you use the ffi ?
<lloda>probably. It would be a lot more work though :-/
<lloda>i'd just find a way to pack args so i can do with 10 rather than port a whole module to the ffi
<old>lloda: could you call a wrapper that accepts a pointer to a struct and in that wrapper call the real function with the > 10 arguments?
<lloda>sure, i could do that. I mentioned it above - pack args
<lloda>it's just easier to make guile accept 11 args instead of 10
<lloda>either way it's an arbitrary number
<wingo>it was just that the ffi can take an arbitrary arg count iirc and i think 'scm is one of the types you can use
<wingo>so you get the smob interface with an arbitrary number of args
<lloda>i see that... but this is in an embedded module, everything is using scm_c_define_gsubr, so it's still easier for me to patch guile :-|
<lloda>i don't want to insist however
<lloda>10 is not an unreasonable limit
<cow_2001>hmm... how safe is it to pass open-pipe* arguments from untrusted source? if i do something like (open-pipe* mode "echo" some-user-input), would it run arbitrary code or will it just output stuff safely?
<cow_2001>i have a feeling i should take user input and pass it to programs through the input pipe instead of providing it as a command argument
<jpoiret>it should be fine iiuc, unless there's a security issue in echo
<jpoiret>i don't know if there's a general limit on arg length on Linux though
<cow_2001>is there a The Great List of Security Issues In Command Line Programs somewhere?
<cow_2001>i can just test it right now
<cow_2001>when argument of echo is about a string of a million "a" it says "In execvp of echo: Argument list too long""
<old>there's a limit of arguments on Linux
<cow_2001>somewhere between 120000 and 150000 on this machine
<cow_2001>that's not very big but it is not that small either
<old>the max is : 0x7FFFFFFF
<old>in linux kernel: include/uapi/linux/binfmts.h
<old>that's quite a lot of arguments
<cow_2001>maybe i should be using devult's pastebin too :|
<wingo>lloda: yeah i dunno, istr that 10 has always been the limit (i.e. was the case in 1.8, wasn't a reduction when we added the compiler) and that expanding it is just a bit annoying
<wingo>but, no strong feelings, if it were 10 we would be fine
<wingo>*15 i mean
<lloda>yeah nbd. I can work around it
<cow_2001>you know what'd be nice having? a pretty-print for records. right now what i see is like one of those minified html sources
<cow_2001>need to bigify it myself
<old>cow_2001: there's (srfi srfi-9 gnu) that alloww defining a pretty-printer for record types
<cow_2001>oh right ~;~
<cow_2001>we talked about it a few days ago
<cow_2001>oh wow. you can write your own custom printer for your records
<cow_2001>okay, the code for guile-config is better documentation than the documentation for guile-config
<chrislck>cow_2001: twas ever thus
<cow_2001>chrislck: i really need to learn how to work with records ~;~