diff mbox series

[meta-oe,master] libfastjson: fix rsyslogd segfault crash at load

Message ID 20260811042353.239543-1-preeti.sachan@intel.com
State Under Review
Headers show
Series [meta-oe,master] libfastjson: fix rsyslogd segfault crash at load | expand

Commit Message

preeti.sachan@intel.com Aug. 11, 2026, 4:23 a.m. UTC
From: Preeti Sachan <preeti.sachan@intel.com>

libfastjson is missing an explicit link dependency on the math library (libm),
which triggers GNU Indirect Function (IFUNC) resolution failure at runtime.

libfastjson internally calls the modf() math function but modf is optimized via
glibc's IFUNC mechanism. Because libfastjson was compiled without -lm, the dynamic
linker (ld.so) cannot safely resolve this dynamic IFUNC redirection, causing rsyslogd
to immediately crash with a segfault error.

rsyslogd boot error:
| starting rsyslogd ... /usr/sbin/rsyslogd: Relink `/usr/lib64/libfastjson.so.4'
| with  `/lib64/libm.so.6' for IFUNC symbol `modf'
| rsyslogd[1311]: segfault at 9c ip

Signed-off-by: Preeti Sachan <preeti.sachan@intel.com>
---
 meta-oe/recipes-extended/rsyslog/libfastjson_1.2304.0.bb | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/rsyslog/libfastjson_1.2304.0.bb b/meta-oe/recipes-extended/rsyslog/libfastjson_1.2304.0.bb
index f1235d7b96..324c0cfbe8 100644
--- a/meta-oe/recipes-extended/rsyslog/libfastjson_1.2304.0.bb
+++ b/meta-oe/recipes-extended/rsyslog/libfastjson_1.2304.0.bb
@@ -10,6 +10,7 @@  SRC_URI = "git://github.com/rsyslog/libfastjson.git;protocol=https;branch=master
 
 SRCREV = "3a8402c1de7c7747c95229db26d8d32fb85a7a52"
 
+EXTRA_OECONF += "LIBS='-lm'"
 
 CVE_PRODUCT = "rsyslog:libfastjson"