0
Fork 0
mirror of https://github.com/dop251/goja.git synced 2026-11-17 19:47:16 +00:00
goja/export_cycle_test.go
DeVaris Brown 19f30c6b06 Fix stack overflow when exporting a Map or Set that contains itself
mapObject.export and setObject.export put themselves into the export cache
but never looked there first, so a collection reachable from itself (directly
or through other objects) recursed until the Go stack overflowed. Look the
object up in the cache first, as baseObject.export already does.

(cherry picked from commit aed438ab3fe6b3c91352ff841c39a580df2247e4)
2026-10-20 09:01:12 -07:00

97 lines
2.7 KiB