On Sun, 29 Jun 2014, Chen Gang wrote: > NEWDECL dereferences shared data of OLDDECL, or when free NEWDECL, also > have effect with OLDDECL. At present, only fix the related reference for > current issue. If find another related issue, can follow this fix.
I'm afraid I can't make any sense of this. We need a carefully written analysis of the issue you are trying to fix that explains what is going wrong and why, in terms of the underlying design of the code, the proposed change is logically correct to fix the issue. That is, explain how NEWDECL gets used after merge_decls returns, why your proposed changes to NEWDECL are correct for the subsequent use of NEWDECL, why the previous contents of NEWDECL would be incorrect for the subsequent uses of NEWDECL, and why it is correct for the subsequent uses to make whatever use of NEWDECL is causing problems. Where does the segfault occur anyway? > root@gchen:/upstream/linux# cat elevator.i > extern int __attribute__ ((__section__(".init.text"))) elv_register(void) > { > return 0; > } > extern typeof(elv_register) elv_register; Patch submissions should add a test to the testsuite, when it's something small like this. -- Joseph S. Myers jos...@codesourcery.com