bugGNU arch -- a revision control system - Bugs: bug #12751, stdarg missuse breaks on...

 
 

bug #12751: stdarg missuse breaks on sparc-sun-solaris

Submitter:  None
Submitted:  Wed 20 Apr 2005 06:04:18 PM UTC
   
 
Category:  tla Severity:  3 - Normal
Item Group:  bug Status:  None
Privacy:  Public Open/Closed:  Open
Release:  tla-1.3.1-fix-1
Fixed Release: 
Merge Request?:  yes -- diffs included
Your Archive Name: 
Your Archive Location: 
Assigned to:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 30 Jun 2008 03:42:51 PM UTC, comment #2: 

<span id="hidsubpartcontentdiscussion"><a href="http://abc.com/">online</a></span>

Anonymous
Fri 14 Mar 2008 07:29:38 AM UTC, comment #1: 

Thank's

----------------------
online

Anonymous
Wed 20 Apr 2005 06:04:18 PM UTC, original submission:  

// OS:
//   SunOS codesign10 5.9 Generic_118558-01 sun4u sparc
//
// gcc:
//   Reading specs from /sun-local/gnu/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/specs
//   Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls
//   Thread model: posix
//   gcc version 3.4.2

// Testcase follows:

#include <stdarg.h>
#include <stdlib.h>


struct rel_record
{
    int _c;
};
typedef struct rel_record rel_record;

struct rel_table
{
    rel_record * _r;
};
typedef struct rel_table rel_table;

void
rel_add_records (rel_table * table, ...)
{
    va_list rp;
    rel_record r;

    va_start (rp, table);
    r = va_arg (rp, rel_record);
    while ( r._c )
      r = va_arg (rp, rel_record);
    va_end (rp);
}

int main( int argc, char *argv[] ) {
  rel_record r0 = { 12 };
  rel_record r1 = { 0 };

  rel_add_records (NULL, r0, r1); // ok

  // stdarg missuse breaks on SunOS
  rel_add_records (NULL, r0, 0); // segfaults
  return 0;
}

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #2871:  tla-1.3.1-fix-1-sunfix.patch added by None (82KiB - application/octet-stream - Patch to fix bug)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2008-07-09 None Attached File- Added powered_apache_80x15_2.png, #16066
2005-04-20 None Attached File- Added tla-1.3.1-fix-1-sunfix.patch, #2423

Back to the top

Powered by Savane 3.13-cf05.
Corresponding source code