[DragonFlyBSD - Bug #3361] (New) newlocale()/freelocale() leak
bugtracker-admin at leaf.dragonflybsd.org
bugtracker-admin at leaf.dragonflybsd.org
Wed Nov 15 17:24:12 PST 2023
Issue #3361 has been reported by tonyc.
----------------------------------------
Bug #3361: newlocale()/freelocale() leak
http://bugs.dragonflybsd.org/issues/3361
* Author: tonyc
* Status: New
* Priority: Normal
* Target version: 6.4
* Start date: 2023-11-16
----------------------------------------
The attached code shows the combination of newlocale() to create a new locale object and freelocale() to free that object leaks memory.
@$ ./newlocale_loop
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
1001 825 822 4 178 0 4124 680 wait S0+ 0 0:00.00 ./n
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
1001 825 822 80 254 0 7.63G 416616 wait S1+ 0 0:05.37 ./n
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
1001 825 822 80 254 0 15.26G 832272 wait S1+ 0 0:09.62 ./n
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
1001 825 822 80 254 0 22.89G 1.19G wait S1+ 0 0:12.80 ./n
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
1001 825 822 80 254 0 30.52G 1.58G wait S1+ 0 0:17.34 ./n
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
1001 825 822 80 254 0 38.15G 1.98G wait S1+ 0 0:18.68 ./n
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
1001 825 822 80 254 0 45.78G 2.37G wait S1+ 0 0:23.65 ./n
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
1001 825 822 80 254 0 53.41G 2.77G wait S1+ 0 0:26.65 ./n
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
1001 825 822 80 254 0 61.04G 3.17G wait S1+ 0 0:30.35 ./n
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
1001 825 822 80 254 0 68.67G 3.56G wait S1+ 0 0:35.02 ./n
@
Note RSS going from 680 to 3.56G
Building and running the same code on Linux (Debian bookworm) and Freebsd 15-CURRENT does not leak in the same way.
---Files--------------------------------
newlocale_loop.c (431 Bytes)
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
More information about the Bugs
mailing list