| MasterDuke | back while pork chops bake. so think this is worth PRing after i clean it up (remove debugging, squash commits, etc.)? | 00:07 | |
| jnthn | github.com/MoarVM/MoarVM/compare/m...dbc21b3R84 # should it not set ssize here also so it knows the size to free? | 00:37 | |
| MasterDuke: Overall, I think it's worth it. | 00:41 | ||
| MasterDuke | jnthn: cool, then i'll work on cleaning it up | 00:54 | |
| jnthn | MasterDuke++ | 00:57 | |
| 'night | |||
| timotimo | MasterDuke: i assume all these $_ ~ rand.Str strings end up being strands-based? it'd probably be interesting to give jnthn's suggestion a shot to use fsa for the strands arrays | 00:58 | |
| MasterDuke | timotimo: i think i do that in my branch already? github.com/MoarVM/MoarVM/compare/m...9bb347cR47 | 00:59 | |
| timotimo | oh, ok! | 01:00 | |
|
02:56
ilbot3 joined
07:02
domidumont joined
07:07
domidumont joined
07:17
geospeck joined
07:53
brrt joined
08:07
brrt joined
|
|||
| nwc10 | good *, #moarvm | 08:17 | |
|
09:04
brrt joined
|
|||
| brrt | good * #moarvm | 09:05 | |
|
09:07
domidumont joined
09:57
zakharyas joined
10:02
zakharyas joined
10:06
lizmat joined
11:09
AlexDaniel joined
|
|||
| MasterDuke | ugh, my branch builds nqp and passes its `make m-test`, and builds rakudo and passes its `make m-test`, but i get a bunch of 'realloc: invalid pointer' and 'free: invalid pointer' during `make m-spectest` | 11:18 | |
|
11:24
brrt joined
|
|||
| MasterDuke | oh, i think it's because i originally branched this from my branch that uses the FSA in VMArray | 11:37 | |
| but i've now rebased it to master | |||
| hm, the MVMROOT* macros can be annoying, valgrind points to a line with MVMROOT3, but i assume it's actually something inside | 13:44 | ||
| jnthn | Try building with --debug=3 | ||
| If you didn't already | |||
| MasterDuke | i have --debug=3 and --valgrind | ||
| jnthn | Ah | ||
| Then, I guess a smarter C compiler is wanted :P | 13:45 | ||
| MasterDuke | gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0 | ||
| jnthn | I've actually no idea what different versions do in this regard, tbh | 13:46 | |
| I've certainly seen this issue | |||
| Oh, it's valgrind doing the pointing | |||
| And I guess it's in gdb where --debug=3 helps | |||
| I think there's a way to do the valgrind run under gdb and breakpoint its reporting, though | 13:47 | ||
| MasterDuke | i guess if i had to i could also convert to manual push/pop for debugging, but i'd really rather not | 13:49 | |
| timotimo | i think c compilers say "macro expansions being considered a single line is a feature!" | 13:51 | |
| MasterDuke | oh, btw, have you had a chance to look at github.com/MoarVM/MoarVM/pull/689 ? (but don't let me distract you from segv hunting) | ||
| timotimo | so, uhm, time for a perl6 script that rewrites MVMROOT macros for us :) | ||
|
14:02
zakharyas joined
14:03
zakharyas joined
14:05
zakharyas1 joined
|
|||
| MasterDuke | ah, i'm trying to fixed_size_free a string with 0 num_graphs or num_strands | 14:11 | |
| timotimo | ah, i know that problem from somewhere | 14:12 | |
| MasterDuke | fwiw it's num_graphs in this instance | 14:13 | |
| the line is: MVM_fixed_size_free(tc, tc->instance->fsa, (str->body.storage_type == MVM_STRING_STRAND ? str->body.num_strands : str->body.num_graphs) * type , str->body.storage.any); | 14:15 | ||
| timotimo | i wonder how often we generate "the empty string" | 14:16 | |
| because why else would it try to free something like that? unless we created an empty string somewhere that turned into garbage | |||
| MasterDuke | it's happening during in/because of MVM_string_split | 14:17 | |
| hm, changing the 0 to a 1 doesn't fix anything. how does one MVM_fixed_size_free a 0 sized thing? | 14:23 | ||
| jnthn | You don't | ||
| You can't allocate on in the first place | |||
| *one | |||
| iirc, anyway | |||
| MasterDuke | "can't" == don't do that, or "can't" == shouldn't be possible ? | 14:24 | |
| timotimo | malloc has some secret sauce for zero-sized allocations that allows you to free them | ||
| jnthn | "Don't do that" | 14:26 | |
| Though when MVM_FSA_DEBUG is set to 1, we could put in sanity checks for that | |||
| MasterDuke | yep, a couple requests for 0 bytes showed up in MVM_fixed_size_alloc | 14:30 | |
| ok, at least one is from MVM_string_flip | 14:33 | ||
| rbuffer = MVM_fixed_size_alloc(tc, tc->instance->fsa, sizeof(MVMGrapheme32) * sgraphs); | |||
| what's the right behavior? just do `res = (MVMString *)MVM_repr_alloc_init(tc, tc->instance->VMString);`, but don't set any of its fields (e.g., don't do `res->body.storage.blob_32 = rbuffer;`)? | 14:38 | ||
| ilmari | timotimo: some mallocs do, but malloc(0) is also allowed to return NULL (and free(NULL) is allowed as well) | 14:41 | |
| jnthn | MasterDuke: That or just detect the case and use the empty_string constant hanging off tc->instance | 14:42 | |
| MasterDuke | ah ha, i thought there was something like that but couldn't come up with the right name | 14:43 | |
|
14:48
lizmat joined
|
|||
| MasterDuke | ugh, now i'm not seeing any 0 byte requests in MVM_fixed_size_alloc, but still getting the 0 bytes free | 14:50 | |
| none in fixed_size_realloc either... | 15:00 | ||
| oh, it's not just 0 bytes to free, to_free is NULL also | 15:03 | ||
| heh, running under valgrind with --debug=3 and --optimize=0 is not fast | 15:36 | ||
|
15:42
zakharyas joined
15:56
geospeck joined
18:05
domidumont joined
18:06
brrt joined
18:29
lizmat joined
18:42
committable6 joined
18:44
brrt joined
19:49
quotable6 joined,
coverable6 joined,
greppable6 joined,
bloatable6 joined,
nativecallable6 joined,
tangible6 joined,
benchable6 joined,
statisfiable6 joined
|
|||
| dogbert17 | hmm, quite silent in here | 20:47 | |
| nwc10 | good *, dogbert17! | 20:49 | |
| dogbert17 | any deadlock experts around? Does the last comment in github.com/rakudo/rakudo/issues/1202 give any clues as what might be going on? | ||
| nwc10 | sorry, I'm not a deadlock expert | ||
| (and I don't know how to flush one out) | |||
| dogbert17 | good evening nwc10, found any ASAN problems recently? | ||
| nwc10 | evening! heresey! | ||
| (and quite accurate, as I'm likely to go to bed soon) | 20:50 | ||
| no, sadly/usefully not | |||
| code quality is too good | |||
| the right sort of problem to have | |||
| dogbert17 | yes indeed | ||
| finding bugs in MoarVM is getting way to hard | 20:51 | ||
|
21:10
zakharyas joined
21:18
lizmat joined
|
|||
| Geth | MoarVM/jit-expr-optimizer: 11 commits pushed by (Bart Wiegmans)++ review: github.com/MoarVM/MoarVM/compare/a...60e747882a |
23:00 | |
|
23:25
evalable6 joined
|
|||