Discussion:
Bug#376159: Open21xx Bug Report
(too old to reply)
Paul Wise
2007-08-11 16:10:10 UTC
Permalink
This is the first time these problems have been brought to my attention.
Unfortunately, I don't have access to the platforms that the build is
failing on. So, unless someone is willing to step up and help me
troubleshoot the problems on those platforms, there is little I can do.
I guess you'll have to remove Open21xx from Debian.
Looks like it never built/worked on those platforms:

http://buildd.debian.org/build.php?arch=&pkg=open21xx

Hopefully someone on the porter lists will be able to help (CCed).

If no-one replies, I'm willing to use the Debian development machines to
help you fix this issue. I'm not familiar with the open21xx source or
package, and I have little time for Debian stuff, so I'll need some
direction and hints about this.
--
bye,
pabs

http://wiki.debian.org/PaulWise
Charles Plessy
2007-08-12 00:50:06 UTC
Permalink
Post by Paul Wise
http://buildd.debian.org/build.php?arch=&pkg=open21xx
Hopefully someone on the porter lists will be able to help (CCed).
Hi,

I am not a porter, and I am ignorant of C. But here is a strace of the
failing part on G5 powerpc, and the enigmatic filename.dat. Hope it can
help...

Have a nice day,
--
Charles Plessy
http://charles.plessy.org
Wako, Saitama, Japan
Matej Vela
2007-08-13 11:50:10 UTC
Permalink
Post by Paul Wise
http://buildd.debian.org/build.php?arch=&pkg=open21xx
Hopefully someone on the porter lists will be able to help (CCed).
If no-one replies, I'm willing to use the Debian development machines to
help you fix this issue. I'm not familiar with the open21xx source or
package, and I have little time for Debian stuff, so I'll need some
direction and hints about this.
Given the list of failing architectures, I think the most likely cause
is some code relying on char being signed by default. And indeed,
building the as21 directory with -fsigned-char makes it build for me.
You're right, as21/cpp.c was comparing a plain char to EOF. I've
uploaded the attached patch, let's see if it works.

Thanks,

Matej
Rogério Brito
2007-08-14 21:00:12 UTC
Permalink
Post by Matej Vela
Given the list of failing architectures, I think the most likely
cause is some code relying on char being signed by default. And
indeed, building the as21 directory with -fsigned-char makes it
build for me.
You're right, as21/cpp.c was comparing a plain char to EOF. I've
uploaded the attached patch, let's see if it works.
Theoretically (and practically also), an EOF should *never* be compared
to a char: only to an int.
Post by Matej Vela
--- open21xx-0.7.5.orig/as21/cpp.c
+++ open21xx-0.7.5/as21/cpp.c
@@ -235,7 +235,7 @@
/* - 2 to leave room for testing comments and quotes */
while (chars_read < max_size - 2)
{
- ch = buf[chars_read] = getc( yyin );
+ buf[chars_read] = ch = getc( yyin );
if (ch == EOF)
{
goto read_done;
I would first read the character from getc, then see if it is EOF and,
depending on the comparison, do whatever is needed. Otherwise, I would
judge the code to be incorrect and losing precision in a case where such
precision should not be lost.


Regards, Rogério Brito.
--
Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8
http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito
Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org
Matej Vela
2007-08-15 10:40:09 UTC
Permalink
Post by Rogério Brito
Theoretically (and practically also), an EOF should *never* be compared
to a char: only to an int.
Post by Matej Vela
--- open21xx-0.7.5.orig/as21/cpp.c
+++ open21xx-0.7.5/as21/cpp.c
@@ -235,7 +235,7 @@
/* - 2 to leave room for testing comments and quotes */
while (chars_read < max_size - 2)
{
- ch = buf[chars_read] = getc( yyin );
+ buf[chars_read] = ch = getc( yyin );
if (ch == EOF)
{
goto read_done;
I would first read the character from getc, then see if it is EOF and,
depending on the comparison, do whatever is needed. Otherwise, I would
judge the code to be incorrect and losing precision in a case where such
precision should not be lost.
Note that ch is an int.

Cheers,

Matej

Keith Clifford
2007-08-15 05:10:08 UTC
Permalink
Hi all,

I've made the necessary corrections to open21xx. I've built it with char
signed and unsigned and that was the only instance of that particular
problem. The new release, open21xx-0.7.6, is available on
http://www3.telus.net/sharpshin/downloads/open21xx.

Please let me know how it goes.

Thanks for your help and regards,
Keith Clifford.

-----Original Message-----
From: Paul Wise [mailto:***@debian.org]
Sent: Saturday, August 11, 2007 8:56 AM
To: Keith Clifford
Cc: ***@bugs.debian.org; debian-powerpc; debian-***@lists.debian.org;
debian-***@lists.debian.org
Subject: RE: Open21xx Bug Report
This is the first time these problems have been brought to my attention.
Unfortunately, I don't have access to the platforms that the build is
failing on. So, unless someone is willing to step up and help me
troubleshoot the problems on those platforms, there is little I can do.
I guess you'll have to remove Open21xx from Debian.
Looks like it never built/worked on those platforms:

http://buildd.debian.org/build.php?arch=&pkg=open21xx

Hopefully someone on the porter lists will be able to help (CCed).

If no-one replies, I'm willing to use the Debian development machines to
help you fix this issue. I'm not familiar with the open21xx source or
package, and I have little time for Debian stuff, so I'll need some
direction and hints about this.
--
bye,
pabs

http://wiki.debian.org/PaulWise
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Loading...