New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ARC] SIGSEGV in arc.nim calling eqcopy for combination of ref objects, noInit, ... #16253
Comments
I don't really know what is causing this, but the error seems to come from this:
T1_ = (tyObject_ColumncolonObjectType___pD6SWjFNwFAKrxUOQIaAeQ*) nimNewObjUninit(sizeof(tyObject_ColumncolonObjectType___pD6SWjFNwFAKrxUOQIaAeQ), NIM_ALIGNOF(tyObject_ColumncolonObjectType___pD6SWjFNwFAKrxUOQIaAeQ));
asType__tata_35(t, (&(*T1_).fCol));
Also probably important to mention that That's basically how it crashes. If you compile with One thing that remains a mystery for me is why it starts doing that at |
While the real solution here is still not entirely clear this code here:
is simply bad. The code generator computes |
Fair enough. To be honest I wasn't aware that the compiler computes |
Another hard to isolate bug, that might be superficially related to #16185 .
Essentially I get a segmentation fault when larger tensors are involved and I try to convert them to a dataframe
Column
(a ref object), which usesasType
internally because it's a variant object.With the exact combination of
{.noInit.}
onasType
Column
I can reproduce it based on the example from #16185.
Sorry, that these are getting larger. :/
Example
Current Output
Expected Output
None and no segmentation fault.
Additional Information
As mentioned in comments in the code sample. The bug is hard to reproduce, because changing one of multiple parameters makes it go away:
Column
a normal object and it worksresult = new Column
syntax intoColumn
and it works (I use that syntax, becauseColumn
normally is a variant object andt.kind = <enumVal>
isn't allowed anymore)toSeq.mapIt
by for loop and it workstoSeq
upper range 1 smaller and it worksnoInit
onasType
and it worksNot sure if it's any added information for someone familiar with ARC internals, but I was surprised to
eqcopy
show up: stack trace from gdb after compilation with--gc:arc --debugger:native
:I suppose
eqcopy
makes sense, because it cannot be a sink forocc
might be used in a later context.The text was updated successfully, but these errors were encountered: