This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Problem with 32-bit negative return values
- From: "Frank Ch. Eigler" <fche at redhat dot com>
- To: Mike Mason <mmlnx at us dot ibm dot com>
- Cc: systemtap at sources dot redhat dot com
- Date: Tue, 10 Oct 2006 13:51:59 -0400
- Subject: Problem with 32-bit negative return values
- References: <452BD98F.8050602@us.ibm.com>
Hi -
On Tue, Oct 10, 2006 at 10:34:07AM -0700, Mike Mason wrote:
> [...]
> I'm trying to use the return value from sock_recvmsg() to determine how
> many bytes are received. It ignores negative return values (errors).
> [...]
> But on x86_64, the negative values are interpreted and printed as large
> positive values:
> RECV 1440
> RECV 4294967285
> [...]
It could easily be a typing/sign-extension bug in the loc2c-related
code. Could you check the generated C code (-p3; look for the
_dwarf_tvar_get function)?
- FChE