[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#635214: marked as done (gcc-4.6: [sparc] miscompile PARI/GP 2.5.0 [test-case provided])



Your message dated Fri, 21 Aug 2015 13:43:08 +0000
with message-id <[🔎] E1ZSmb6-0004jv-26@franck.debian.org>
and subject line Bug#796274: Removed package(s) from unstable
has caused the Debian Bug report #635214,
regarding gcc-4.6: [sparc] miscompile PARI/GP 2.5.0 [test-case provided]
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
635214: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=635214
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: gcc-4.6
Version: 4.6.1-4
Severity: normal

Hello Debian GCC Maintainers,

gcc-4.6 miscompiles pari 2.5.0 on sparc, see
See https://buildd.debian.org/status/fetch.php?pkg=pari&arch=sparc&ver=2.5.0-1&stamp=1311418380

Please find a small test-case attached (test.c)

gcc -O2 -g -Wall -fno-strict-aliasing test.c -o test
./test
zsh: segmentation fault  ./test

It does not segfault with -fno-inline and also with -fPIC.

This bug is very similar to 627084 except it only happens on sparc and that the
test-case is simpler.

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 
#include <stdlib.h>

inline void*
pari_realloc(void *pointer, size_t size)
{
  char *tmp;
  if (!pointer)
    tmp = (char *) malloc(size);
  else
    tmp = (char *) realloc(pointer,size);
  return tmp;
}

typedef struct {
  long offset;
  long n;
  long alloc;
  size_t size;
} pari_stack;

inline void **
stack_base(pari_stack *s) { return (void **) ((char *)s+s->offset); }

inline void
stack_init(pari_stack *s, size_t size, void **data)
{
  s->offset = (char *)data-(char *)s;
  *data = NULL;
  s->n = 0;
  s->alloc = 0;
  s->size = size;
}

inline void
stack_alloc(pari_stack *s, long nb)
{
  void **sdat = stack_base(s);
  if (s->n+nb <= s->alloc) return;
  if (!s->alloc)
    s->alloc = nb;
  else
  {
    while (s->n+nb > s->alloc) s->alloc <<= 1;
  }
  *sdat = pari_realloc(*sdat,s->alloc*s->size);
}

inline long
stack_new(pari_stack *s) { stack_alloc(s, 1); return s->n++; }

inline void
stack_pushp(pari_stack *s, void *u)
{
  long n = stack_new(s);
  void **sdat =(void**) *stack_base(s);
  sdat[n] = u;
}

static void ** MODULES, ** OLDMODULES;
static pari_stack s_MODULES, s_OLDMODULES;

void
pari_init_functions(void)
{
  stack_init(&s_MODULES, sizeof(*MODULES),(void**)&MODULES);
  stack_pushp(&s_MODULES,NULL);
  stack_init(&s_OLDMODULES, sizeof(*OLDMODULES),(void**)&OLDMODULES);
  stack_pushp(&s_OLDMODULES,NULL);
}

int main(void)
{
  pari_init_functions();
  return 0;
}

--- End Message ---
--- Begin Message ---
Version: 4.6.4-7+rm

Dear submitter,

as the package gcc-4.6 has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/796274

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

--- End Message ---

Reply to: