Opened 13 months ago

Closed 13 months ago

Last modified 12 months ago

#18344 closed bug (fixed)

newlocale crashes after a previous call to freelocale

Reported by: bhaible Owned by: nobody
Priority: normal Milestone: R1/beta5
Component: System/POSIX Version: R1/beta4
Keywords: r1beta4-fixes Cc:
Blocked By: #18336 Blocking:
Platform: All

Description

In a program that uses both newlocale() and freelocale(), newlocale may crash. When I comment out the freelocale calls, newlocale no longer crashes (but of course, the program likely has a memory leak then).

$ gcc -Wall foo.c
$ ./a.out

Attachments (2)

foo.c (409 bytes ) - added by bhaible 13 months ago.
test case
a.out-204159-debug-05-04-2023-16-43-51.report (8.4 KB ) - added by bhaible 13 months ago.
crash report

Download all attachments as: .zip

Change History (9)

by bhaible, 13 months ago

Attachment: foo.c added

test case

comment:1 by waddlesplash, 13 months ago

Keywords: locale_t newlocale freelocale removed
Platform: x86-64All

comment:2 by waddlesplash, 13 months ago

Please attach the crash report.

by bhaible, 13 months ago

crash report

comment:3 by waddlesplash, 13 months ago

Blocked By: 18336 added

Looks probably related to #18336.

comment:4 by waddlesplash, 13 months ago

Milestone: UnscheduledR1/beta5
Resolution: fixed
Status: newclosed

Fixed in hrev56941.

comment:5 by jmairboeck, 13 months ago

Could this be backported to beta4? It would likely fix a crash of fontforge during the build of lilypond, see https://github.com/haikuports/haikuports/pull/8394#issuecomment-1510457227

I still need to test that though, probably this weekend.

comment:7 by pulkomandy, 12 months ago

Keywords: r1beta4-fixes added
Note: See TracTickets for help on using tickets.