[daip] New Client Reply - [!XAQ-182450]: Text installation of AIPS on Ubuntu 11.04 (gcc, gforgran 4.5.2)

Michael Bietenholz do-not-reply at nrao.edu
Tue Aug 23 12:10:53 EDT 2011


New Client Reply: Text installation of AIPS on Ubuntu 11.04 (gcc,gforgran 4.5.2)

Here's what I have gleaned from a bit of surfing about "FORTIFY":
https://wiki.ubuntu.com/CompilerFlags mentions that the
"buffer overflow" error is likely due to using "sprintf", rather than
"snprintf" - that seems a likely culprit, as AIPS seems to have only
sprintf's in. For snprintf you have to specify a max size to write.
Its not clear to me that there really was a buffer overflow, or if
FORTIFY is just being excessively paranoid and shutting down your
exectuable because there might be one.  However, there seems to still
be some disagreement about different versions of snprintf, so I think
replacing all the printf's with snprintf's would be premature at this
stage.

It will be hard to reproduce the error I saw: it was inconsistent -
PRTUV crashed with the error messages I sent you, but the next day, as
far as I can tell without anything having been changed either on AIPS
or the system, it worked fine.  Could of course be some even more
deep-seated kernel bug.

Secondly, it seems to come in with the AIPS SUBLIB's - it was only
when I recompiled all of aips, ie. the SUBLIB's as well with that
option that the problem went away, just re-COMLNK'ing PRTUV
itself with the -U_FORTIFY... option didn't help (produced
a bit-for-bit identical .EXE)

> It would be nice to run it in debug and see where the overflow
> occurs... Unfortunately the gfortran here is 4.1.2 which is ancient
> and known not to work.

I think I do still have parked somwhere the complete directory tree
for the AIPS compiled without that -U_FORTIFY.... option as I
re-unpacked and started over in a new directory when I re-did it.  I
could probably, in principle, re-compile the whole thing without
-U_FORTIFY... and the "debug-libs" on and send you the .EXE for
inspection if you think that is useful.  I suspect it probably makes
more sense for you to set up (or use) an existing Ubuntu system there.
At least in South Africa, Ubuntu seems the most popular linux distro
among astronomers, so you may encouter other Ubuntu users.  I switched
from Centos/Red-Hat because centos is poor at keeping up with drivers
for wireless etc for laptops.

> I worry that gfortran at 4.5 is doing something strange.

Me too :-)

                        michael

Ticket Details
===================
Ticket ID: XAQ-182450
Department: AIPS Data Processing
Priority: Default
Status: Open
Link:  https://help.nrao.edu/staff/index.php?_m=tickets&_a=viewticket&ticketid=1066




More information about the Daip mailing list