r-lib / vctrs

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

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

Open const-ae opened 1 month ago

const-ae commented 1 month 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).