Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 188308 Details for
Bug 231893
sys-apps/ed: Segmentation Fault on Alpha when built with -O2 -finline-functions
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
newer patch against 1.2
ed_patch1.diff (text/plain), 2.19 KB, created by
Matthew Kern
on 2009-04-14 12:26:09 UTC
(
hide
)
Description:
newer patch against 1.2
Filename:
MIME Type:
Creator:
Matthew Kern
Created:
2009-04-14 12:26:09 UTC
Size:
2.19 KB
patch
obsolete
>diff -urdN ../old_src/carg_parser.c ./carg_parser.c >--- ../old_src/carg_parser.c 2009-01-15 12:24:29.000000000 +0100 >+++ ./carg_parser.c 2009-04-14 11:27:38.000000000 +0200 >@@ -22,13 +22,13 @@ > > > /* assure at least a minimum size for buffer `buf' */ >-char ap_resize_buffer( void *buf, const int min_size ) >+char ap_resize_buffer( void **buf, const int min_size ) > { > void *new_buf = 0; >- if( *(void **)buf ) new_buf = realloc( *(void **)buf, min_size ); >+ if( *buf ) new_buf = realloc( *buf, min_size ); > else new_buf = malloc( min_size ); > if( !new_buf ) return 0; >- *(void **)buf = new_buf; >+ *buf = new_buf; > return 1; > } > >@@ -37,13 +37,16 @@ > { > const int len = strlen( argument ); > ap_Record *p; >- if( !ap_resize_buffer( (void *)&(ap->data), >- ( ap->data_size + 1 ) * sizeof( ap_Record ) ) ) >+ void * alias = ap->data; >+ if( !ap_resize_buffer( &alias, ( ap->data_size + 1 ) * sizeof( ap_Record ) ) ) > return 0; >+ ap->data = (ap_Record *)alias; > p = &(ap->data[ap->data_size]); > p->code = code; > p->argument = 0; >- if( !ap_resize_buffer( (void *)&(p->argument), len + 1 ) ) return 0; >+ alias = p->argument; >+ if( !ap_resize_buffer( &alias, len + 1 ) ) return 0; >+ p->argument = (char *)alias; > strncpy( p->argument, argument, len + 1 ); > ++ap->data_size; > return 1; >@@ -53,8 +56,9 @@ > char add_error( Arg_parser * ap, const char * msg ) > { > const int len = strlen( msg ); >- if( !ap_resize_buffer( (void *)&(ap->error), ap->error_size + len + 1 ) ) >- return 0; >+ void * alias = ap->error; >+ if( !ap_resize_buffer( &alias, ap->error_size + len + 1 ) ) return 0; >+ ap->error = (char *)alias; > strncpy( ap->error + ap->error_size, msg, len + 1 ); > ap->error_size += len; > return 1; >@@ -225,9 +229,11 @@ > { > if( !in_order ) > { >- if( !ap_resize_buffer( (void *)&non_options, >+ void * alias = non_options; >+ if( !ap_resize_buffer( &alias, > ( non_options_size + 1 ) * sizeof( *non_options ) ) ) > return 0; >+ non_options = (const char **)alias; > non_options[non_options_size++] = argv[argind++]; > } > else if( !push_back_record( ap, 0, argv[argind++] ) ) return 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 231893
:
160478
|
160480
|
188091
| 188308