Conversation
Notices
-
kirby (kirby@netzsphaere.xyz)'s status on Wednesday, 12-Feb-2025 02:16:42 JST kirby
why do it segfault? hmm -
pwm (pwm@lab.nyanide.com)'s status on Wednesday, 12-Feb-2025 02:16:34 JST pwm
@kirby I think strtok does some internal housekeeping so that does sorta make sense. -
kirby (kirby@netzsphaere.xyz)'s status on Wednesday, 12-Feb-2025 02:16:35 JST kirby
@pwm fucked up the arguments in the latter call, it is supposed to be strtok(NULL, "."); nyanide :nyancat_rainbow::nyancat_body::nyancat_face: repeated this. -
pwm (pwm@lab.nyanide.com)'s status on Wednesday, 12-Feb-2025 02:16:37 JST pwm
@kirby Don't quote me but I think it replaces the first character of the delimiter (it supports multiple iirc) with nulls, breaking the string into an array. I don't think that would make your free call fail as it has no way to muck about with the value of the pointer, so I think the culprit is inside your loop somehow, perhaps atoi? -
kirby (kirby@netzsphaere.xyz)'s status on Wednesday, 12-Feb-2025 02:16:37 JST kirby
@pwm that would be a, really weird issue but I'll see if that's the case later -
pwm (pwm@lab.nyanide.com)'s status on Wednesday, 12-Feb-2025 02:16:39 JST pwm
@kirby doublecheck your usage of strtok and strdup would be the frst places I'd look. There are subtleties to strtok iirc, since it mangles the thing you give it -
kirby (kirby@netzsphaere.xyz)'s status on Wednesday, 12-Feb-2025 02:16:39 JST kirby
@pwm yeah that's what I'm gonna have to do when i get my hands on a debugger on the Book :catSleep: -
kirby (kirby@netzsphaere.xyz)'s status on Wednesday, 12-Feb-2025 02:16:40 JST kirby
@pwm yeah but the problem is where exactly am i dereferencing it, it's not obvious hsre -
pwm (pwm@lab.nyanide.com)'s status on Wednesday, 12-Feb-2025 02:16:41 JST pwm
@kirby you're dereferencing a null pointer -
þernia (pernia@cum.salon)'s status on Wednesday, 12-Feb-2025 02:17:20 JST þernia
@kirby @pwm get raped kird -
nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Wednesday, 12-Feb-2025 02:17:24 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
@pwm @kirby it does
-