🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #531

The Sun bug, after taking a deep breath and counting to 10...

#531
From: David Fox
Date: Sat, 21 Nov 1992 08:20
26 lines
947 bytes
Compile the following program with g++-2.1 or later on a sparc,
invoke gdb-4.7, put a break point at the first statement of
main, and then do a "next".  Instead of stopping at the second
line of the program the program finishes executing and exit:

#include <stdio.h>

struct foo {
  int a;
  int b;
};

foo bar(int x, int y)
{
  foo r;
  r.a = x;
  r.b = y;
  return r;
}

main()
{
  foo i = bar(1, 2);
  foo j = bar(3, 4);
  printf("%d %d %d %d\n", i.a, i.b, j.a, j.b);
}
Technical Details
Message-ID: <9211211820.AA23772@GRAPHICS.CS.NYU.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!graphics.cs.nyu.edu!fox

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gdb.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!graphics.cs.nyu.edu!fox
From: fox@graphics.cs.nyu.edu (David Fox)
Subject: The Sun bug, after taking a deep breath and counting to 10...
Message-ID: <9211211820.AA23772@GRAPHICS.CS.NYU.EDU>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Sat, 21 Nov 1992 08:20:45 GMT
Approved: bug-gdb@prep.ai.mit.edu
Lines: 27