Menu

#2 Multiple finalizers in wrapCompile causes segfault

open
nobody
None
5
2011-04-22
2011-04-22
No

wrapCompile in Text.Regex.Posix.Wrap uses mallocForeignPtrBytes to create a foreign pointer (which implicitly assigns a finalizer), but also explicitly assigns a finalizer via addForeignPtrFinalizer, causing a double-free to occur, leading to an occasional segfault. Removing the line "addForeignPtrFinalizer c_regfree regex_fptr" fixes the problem.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.