[Issue 1571] Segfault(class.c) const on function parameters not carried through to .di file

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1571

Andrei Alexandrescu  changed:

   What|Removed |Added

Version|2.005   |D2

--


[Issue 1571] Segfault(class.c) const on function parameters not carried through to .di file

2009-10-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1571


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #2 from Walter Bright  2009-10-06 
02:12:56 PDT ---
Fixed dmd 1.048 and 2.033

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 1571] Segfault(class.c) const on function parameters not carried through to .di file

2009-09-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1571


Don  changed:

   What|Removed |Added

   Keywords|wrong-code  |ice-on-invalid-code, patch
 CC||clugd...@yahoo.com.au
Summary|const on function   |Segfault(class.c) const on
   |parameters not carried  |function parameters not
   |through to .di file |carried through to .di file


--- Comment #1 from Don  2009-09-10 14:21:20 PDT ---
This now segfaults. crashing ClassDeclaration::toCBuffer on members->dim when
members is null.

With the attached patch, as well as preventing the crash, the correct output is
produced.

Patch: class.c line 735 and 749. should ensure class has members,
before writing the members out!

+if(members){
buf->writenl();
buf->writeByte('{');
buf->writenl();
for (int i = 0; i < members->dim; i++)
{
Dsymbol *s = (Dsymbol *)members->data[i];

buf->writestring("");

s->toCBuffer(buf, hgs);
}
buf->writestring("}");
 +   }elsebuf->writestring(";");

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---