| 20a89254 | 02-Apr-2014 |
Jed Brown <jed@jedbrown.org> |
malloc: PETSC_USE_MALLOC_COALESCED, work around IBM XL miscompile
IBM XL 12.1 for BG/Q and POWER at optimization level -O and above miscompiles code such as the following, as reduced from PetscMallo
malloc: PETSC_USE_MALLOC_COALESCED, work around IBM XL miscompile
IBM XL 12.1 for BG/Q and POWER at optimization level -O and above miscompiles code such as the following, as reduced from PetscMalloc3.
struct {double *a,*b,*c;} *t; t = malloc(sizeof *t); (*(void**)&t->a = malloc(24)) && (*(void**)&t->b = t->a+1,*(void**)&t->c = t->b+1,0); printf("%p %p %p\n",(void*)t->a,(void*)t->b,(void*)t->c);
The compiler incorrectly allows reordering of
*(void**)&t->b = t->a+1;
as though this statement did not modify t->b. To work around this, and to be more flexible on malloc policy (including debugging malloc issues), we add PETSC_USE_MALLOC_COALESCED which is normally enabled for debugging=0 builds, but not when using broken compilers.
show more ...
|
| 943bb183 | 01-Apr-2014 |
Jed Brown <jed@jedbrown.org> |
Merge branch 'jed/gnumake'
Shared library versioning and less redundancy in gmakefile
* jed/gnumake: gmakefile: fix multiline variable for make-3.81 make: hide library symlinking make shared:
Merge branch 'jed/gnumake'
Shared library versioning and less redundancy in gmakefile
* jed/gnumake: gmakefile: fix multiline variable for make-3.81 make: hide library symlinking make shared: use leading 0 to indicate development version make shared: pass path to SL_LINKER_FUNCTION make: simply list objects as dependencies instead of via target-specific var make shared: link directly to the actual library rather than via soname make shared: symlink without directory and install by recreating symlinks make shared: fix library versioning, sonames, and symbolic linking make shared: default SL_LINKER_FUNCTION (revert before release) make shared: use configure to determine shared linking
Conflicts: gmakefile
show more ...
|