Bug 264669 - sysutils/wmmemload: fails with stack overflow after build with stack-protector-strong
Summary: sysutils/wmmemload: fails with stack overflow after build with stack-protecto...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-14 13:57 UTC by Arie Bikker
Modified: 2024-04-27 18:25 UTC (History)
2 users (show)

See Also:
mbeis: maintainer-feedback+


Attachments
Patch arraysize receiving argument sysctl (557 bytes, patch)
2022-06-14 13:57 UTC, Arie Bikker
no flags Details | Diff
sysutils/wmmemload: fix aborting at start (492 bytes, patch)
2024-03-10 14:14 UTC, Marco Beishuizen
mbeis: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arie Bikker 2022-06-14 13:57:13 UTC
Created attachment 234678 [details]
Patch arraysize receiving argument sysctl

both binary package and ports compiled version fail

$ wmmemload
Abort

leaving line in /var/log/messages:

Jun 14 15:35:33 azd wmmemload[55487]: stack overflow detected; terminated
Jun 14 15:35:33 azd kernel: pid 55487 (wmmemload), jid 0, uid 1001: exited on signal 6

Problem seems to be fixed size of mib array in src/mem_freebsd.c
For descendants of "vm.swap_info" array size should be 3
Comment 1 Marco Beishuizen 2024-03-10 14:14:48 UTC
Created attachment 249074 [details]
sysutils/wmmemload: fix aborting at start
Comment 2 Marco Beishuizen 2024-03-10 14:18:01 UTC
The patch from Arie didn't build with the "char mib_base = "vm.swap_info";" line in it so removed that and left the increase from 2 > 3 of "int mib[]"
Comment 3 Zsolt Udvari freebsd_committer freebsd_triage 2024-04-27 18:24:15 UTC
Could you please create a patch on the ports tree?
See https://docs.freebsd.org/en/books/porters-handbook/book/#slow-patch