pantoniou / libfyaml

Fully feature complete YAML parser and emitter, supporting the latest YAML spec and passing the full YAML testsuite.
MIT License
239 stars 73 forks source link

Problem: setting anchors manually before resolution #88

Closed yrashk closed 9 months ago

yrashk commented 1 year ago

Getting an error indicating free() trying free what was not allocated:

malloc: *** error for object 0x16b03e550: pointer being freed was not allocated

Solution: ensure anchoring setup doesn't erroneously point to non-allocated data

In the original code, data_copy was getting a new pointer allocation, and that was making the code below assume text is malloc'd, which is not necessarily true.

yrashk commented 10 months ago

Bumping this up because this is a memory-related issue and the severity this brings.

yrashk commented 9 months ago

Any chance this can be reviewed so that we can avoid that erroneous pointer freeing? Thank you!

pantoniou commented 9 months ago

This looks right. Merging.