Issues

Issue #106 resolved

signedness issue in p9p dc

Anonymous created an issue

Hi,

on platforms which have unsigned chars by default (such as ARM), dc has a bug:

ceres ~%% uname -a Linux ceres 3.2.27-5-ARCH+ #1 PREEMPT Fri Sep 14 15:16:00 UTC 2012 armv6l GNU/Linux ceres ~%% echo '4 3 - p' | /opt/plan9/bin/dc <empty line>

Compare: hecate ~% uname -a Linux hecate 3.4.7-1-ARCH #1 SMP PREEMPT Sun Jul 29 22:02:56 CEST 2012 x86_64 GNU/Linux hecate ~% echo '4 3 - p' | /opt/plan9/bin/dc 1

Building with -fsigned-char helps, but it probably should be fixed in the code (I don't know where exactly, tho...)

Comments (2)

  1. Russ Cox repo owner

    Thanks. I changed plan9port to compile with -fsigned-char always. It is much easier to create the compilation environment it expects than to track down every last one of these portability problems. It's all legacy code.

  2. Log in to comment