r-lib / vctrs

Generic programming with typed R vectors
https://vctrs.r-lib.org
Other
289 stars 66 forks source link

`vec_group_id` crashes with stack overflow for matrix with custom class #1938

Open const-ae opened 5 months ago

const-ae commented 5 months ago

The following line crashes for me:

vctrs::vec_group_id(structure(matrix(1:10, ncol = 1), class = "custom"))
> Error: C stack usage  7970016 is too close to the limit

I tried it under R 4.4 and 4.3 with vctrs version 0.6.5. (Interestingly, I do not get the error when I run the code in reprex).