Bug 2587560

Summary: qepcad-B hangs reading its rc file on aarch64 (char compared to EOF)
Product: [Fedora] Fedora Reporter: Doug Torrance <douglas.a.torrance>
Component: qepcad-BAssignee: Jerry James <loganjerry>
Status: ASSIGNED --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 45CC: loganjerry
Target Milestone: ---   
Target Release: ---   
Hardware: aarch64   
OS: Linux   
URL: https://github.com/chriswestbrown/qepcad/pull/3
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Doug Torrance 2026-11-30 19:23:48 UTC
On aarch64, qepcad loops forever while reading its rc file, then eventually aborts with std::bad_alloc. The input-stream code reads characters into a plain `char` and compares it to EOF. On aarch64, plain char is unsigned, so in.get() returning -1 becomes 255 and never compares equal to EOF.


Reproducible: Always

Steps to Reproduce:
Run qepcad on an aarch64 machine
Actual Results:
qepcad spins reading the rc file until it aborts with std::bad_alloc.

Expected Results:
qepcad reads the rc file and starts normally, as it does on x86_64.

Additional Information:
Debian has carried a fix since 2021: declare these variables as `signed char` in source/db/convenientstreams.h, source/convenientstreams.h, and extensions/rend/rend.h.

Patch: https://salsa.debian.org/math-team/qepcad/-/raw/master/debian/patches/signed-char-eof.patch
Debian bug: https://bugs.debian.org/996561
Upstream PR: https://github.com/chriswestbrown/qepcad/pull/3

Macaulay2 currently has to leave qepcad-B out of its aarch64 Fedora build image because of this:
https://github.com/Macaulay2/M2/pull/4831

Comment 1 Jerry James 2026-11-30 21:42:55 UTC
Thanks for the report and the pointer to the patch, Doug. Much appreciated! I will push builds today with this patch. Those for the stable Fedora releases (44 and 45) will need to go through the usual testing process, which means they should be available early next week.  (Fedora 43 reaches End Of Life in 2 days, so I'm not going to do anything with it.)