Re: GIN FailedAssertions on Itanium2 with Intel compiler
Re: GIN FailedAssertions on Itanium2 with Intel compiler
От:
Martijn van Oosterhout <kleptog@svana.org>
Дата:
On Fri, Sep 01, 2006 at 03:10:44PM +0400, Teodor Sigaev wrote: > BTW, this example works correct with -nolib-inline > (http://www.intel.com/software/products/compilers/clin/docs/main_cls/mergedprojects/copts_cls/ccpp_options/option_nolib_inline.htm): > % icc -O2 -nolib_inline -o 1 1.c&& ./1 > CALL cmp > SET SI = 1 > OK > > PS Have anybody any thoughts about workaround? What does that option do? Is it practical to enable it for the entire backend? And isn't this a straightforward compiler bug they should be notified about? Sounds like the -fno-strict-aliasing option for gcc, the compiler is making some assumptions about the code that arn't true, so we tell the compiler not to do that. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate.
Re: GIN FailedAssertions on Itanium2 with Intel
От:
Bruce Momjian <bruce@momjian.us>
Дата:
Teodor Sigaev wrote: > > What does that option do? Is it practical to enable it for the entire > > backend? > From docs: > Disables inline expansion of standard library or intrinsic functions. > > > And isn't this a straightforward compiler bug they should be notified > > about? > What's a choice? Now I see 3: > 1) -O1 > 2) "volatile" > 3) -nolib_inline > > IMHO, only -O1 is guarantee for other possible places... But I'm not familiar > enough with such kinds of bugs. My guess is that the compiler writers saw you calling a libc function, and assumed that library could not modify the file static variable, forgetting that the libc function can call back into the original file. Can you detect the Itanium compiler and optimization levels via preprocessor symbols, and test for that, and throw an #error? -- Bruce Momjian bruce@momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
Re: GIN FailedAssertions on Itanium2 with Intel
От:
Bruce Momjian <bruce@momjian.us>
Дата:
I suggest you test for the Intel compiler, and if it is there, make the static variable "volatile", and add a comment about why that is being done. --------------------------------------------------------------------------- Sergey E. Koposov wrote: > On Sat, 2 Sep 2006, Bruce Momjian wrote: > > > Teodor Sigaev wrote: > >>> What does that option do? Is it practical to enable it for the entire > >>> backend? > >> From docs: > >> Disables inline expansion of standard library or intrinsic functions. > >> > >>> And isn't this a straightforward compiler bug they should be notified > >>> about? > >> What's a choice? Now I see 3: > >> 1) -O1 > >> 2) "volatile" > >> 3) -nolib_inline > >> > >> IMHO, only -O1 is guarantee for other possible places... But I'm not familiar > >> enough with such kinds of bugs. > > > > My guess is that the compiler writers saw you calling a libc function, > > and assumed that library could not modify the file static variable, > > forgetting that the libc function can call back into the original file. > > > > Can you detect the Itanium compiler and optimization levels via > > preprocessor symbols, and test for that, and throw an #error? > > No, it's impossible. > Unfortunately the __OPTIMIZE__ preproc. symbol of icc doesn't allow to > distinguish between different optimization levels. (only between -O0 and > anything else). > > Regards, > Sergey > > ******************************************************************* > Sergey E. Koposov > Max Planck Institute for Astronomy/Sternberg Astronomical Institute > Tel: +49-6221-528-349 > Web: http://lnfm1.sai.msu.ru/~math > E-mail: math@sai.msu.ru > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org -- Bruce Momjian bruce@momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
Re: GIN FailedAssertions on Itanium2 with Intel compiler
От:
Teodor Sigaev <teodor@sigaev.ru>
Дата:
Huh, it's a over-optimization by icc on Itanium. With -00 or -02 there is no any
problem, only -O2 produces such effect. The problem is in code at lines 125-172
in ginutils.c:
static bool needUnique = false;
int cmpFunc(...) {...if (...) needUnique = true;...
}
...
needUnique = false;
qsort(...., cmpFunc);
if (needUnique) ....
And, needUnique was setted to true in last call of cmpFunc (by accident, in
fact), so between last call and checking of needUnique there isn't any call of
function. Insertion after qsort() any call (elog, for example) solves the problem.
If needUnique is marked as "volatile", all is ok too. But this way doesn't seem
to me as reasonable, because there is a lot of places with potentially the same
problem... and thats may cause unpredictable failures. May be, better way is
limiting optimization level on Itanium with icc.
--
Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/
Re: GIN FailedAssertions on Itanium2 with Intel compiler
От:
Teodor Sigaev <teodor@sigaev.ru>
Дата:
Simple illustration:
#include
#include
static char SI = 0;
static int
cmp(const void *a, const void *b) { puts("CALL cmp"); if ( *(int*)a == *(int*)b ) { puts("SET SI = 1"); SI = 1; return 0; } return ( *(int*)a > *(int*)b ) ? 1 : -1;
}
int
main(int argn, char *argv[]) { int a[]={43,43};
SI = 0; qsort(a, sizeof(a)/sizeof(int), sizeof(int), cmp);
if ( SI ) puts("OK"); else puts("BUG: SI==0");
return 0;
}
% icc -O2 -o 1 1.c && ./1
CALL cmp
SET SI = 1
BUG: SI==0
% icc -O1 -o 1 1.c && ./1
CALL cmp
SET SI = 1
OK
--
Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/
Re: GIN FailedAssertions on Itanium2 with Intel compiler
От:
Teodor Sigaev <teodor@sigaev.ru>
Дата:
> Huh, it's a over-optimization by icc on Itanium. With -00 or -02 there > is no any problem, only -O2 produces such effect. The problem is in code Sorry, right "With -00 or -01 there is no any problem" -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/
Re: GIN FailedAssertions on Itanium2 with Intel compiler
От:
Teodor Sigaev <teodor@sigaev.ru>
Дата:
> % icc -O2 -o 1 1.c && ./1 > CALL cmp > SET SI = 1 > BUG: SI==0 > % icc -O1 -o 1 1.c && ./1 > CALL cmp > SET SI = 1 > OK BTW, this example works correct with -nolib-inline (http://www.intel.com/software/products/compilers/clin/docs/main_cls/mergedprojects/copts_cls/ccpp_options/option_nolib_inline.htm): % icc -O2 -nolib_inline -o 1 1.c&& ./1 CALL cmp SET SI = 1 OK PS Have anybody any thoughts about workaround? -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/
Re: GIN FailedAssertions on Itanium2 with Intel compiler
От:
Teodor Sigaev <teodor@sigaev.ru>
Дата:
> What does that option do? Is it practical to enable it for the entire > backend?From docs: Disables inline expansion of standard library or intrinsic functions. > And isn't this a straightforward compiler bug they should be notified > about? What's a choice? Now I see 3: 1) -O1 2) "volatile" 3) -nolib_inline IMHO, only -O1 is guarantee for other possible places... But I'm not familiar enough with such kinds of bugs. -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/
GIN FailedAssertions on Itanium2 with Intel compiler
От:
"Sergey E. Koposov" <math@sai.msu.ru>
Дата:
Hello -hackers,
I see a make check failures on Itanium2 platform with Intel Compiler
with CVS HEAD. A failure is coming for GIN.
The problem is coming at the assertion at ginbulk.c:62
TRAP: FailedAssertion("!(res != 0)", File: "ginbulk.c", Line: 62)
during the index creation from the regr. tests CREATE INDEX ii on array_index_op_test using gin(i);
The backtraces before the assertion (unfortunately from intel debugger...):
(idb) bt
#0 0x400000000014d370 in ginChooseElem (accum=0x3, heapptr=0x18000000002, entries=0x1200000012, nentry=16384, low=2, high=16, offset=8192) at ginbulk.c:62
#1 0x400000000014cd00 in ginChooseElem (accum=0x3, heapptr=0x18000000002, entries=0x1200000012, nentry=16384, low=2, high=16, offset=8192) at ginbulk.c:168
#2 0x400000000014c790 in ginInsertRecordBA (accum=0x3, heapptr=0x18000000002, entries=0x1200000012, nentry=16384) at ginbulk.c:192
#3 0x4000000000123380 in ginBuildCallback (index=0x3, htup=0x18000000002, values=0x1200000012, isnull=0x4000 , tupleIsAlive=2 '\002', state=0x1800000010) at gininsert.c:203
#4 0x4000000000174ee0 in IndexBuildHeapScan (heapRelation=0x3, indexRelation=0x18000000002, indexInfo=0x1200000012, callback=0x4000, callback_state=0x18000000002) at index.c:1534
#5 0x4000000000124ea0 in ginbuild (fcinfo=0x3) at gininsert.c:311
#6 0x40000000006eaf00 in OidFunctionCall3 (functionId=3, arg1=1649267441666, arg2=77309411346, arg3=16384) at fmgr.c:1460
#7 0x4000000000177390 in reindex_relation (relid=3, toast_too=2 '\002') at index.c:1282
#8 0x4000000000172700 in index_create (heapRelationId=3, indexRelationName=0x18000000002 , indexRelationId=18, indexInfo=0x4000, accessMethodObjectId=2, tableSpaceId=16, classObjectId=0x2000, reloptions=1649267441666, isprimary=0 '\000', isconstraint=0 '\000', allow_system_table_mods=0 '\000', skip_build=0 '\000', concurrent=0 '\000') at index.c:782
---Type to continue, or q to quit---
#9 0x4000000000270df0 in DefineIndex (heapRelation=0x3, indexRelationName=0x18000000002 , indexRelationId=18, accessMethodName=0x4000 , tableSpaceName=0x18000000002 , attributeList=0x1800000010, predicate=0x2000, rangetable=0x18000000002, options=0x0, unique=0 '\000', primary=0 '\000', isconstraint=0 '\000', is_alter_table=0 '\000', check_rights=1 '\001', skip_build=0 '\000', quiet=0 '\000', concurrent=0 '\000') at indexcmds.c:440
#10 0x400000000051b3b0 in ProcessUtility (parsetree=0x3, params=0x18000000002, dest=0x1200000012, completionTag=0x4000 ) at utility.c:789
#11 0x4000000000518100 in PortalRunMulti (portal=0x3, dest=0x18000000002, altdest=0x1200000012, completionTag=0x4000 ) at pquery.c:1062
#12 0x4000000000516f90 in PortalRun (portal=0x3, count=1649267441666, dest=0x1200000012, altdest=0x4000, completionTag=0x18000000002 ) at pquery.c:700
#13 0x400000000050e770 in exec_simple_query (query_string=0x3 ) at postgres.c:1003
#14 0x400000000050bc20 in PostgresMain (argc=3, argv=0x18000000002, username=0x1200000012 ) at postgres.c:3263
#15 0x400000000045fc20 in BackendRun (port=0x3) at postmaster.c:2848
#16 0x400000000045ea80 in ServerLoop () at postmaster.c:2485
#17 0x400000000045c310 in PostmasterMain (argc=3, argv=0x18000000002) at postmaster.c:950
#18 0x400000000035a0b0 in main (argc=3, argv=0x18000000002) at main.c:187
(idb) bt full
#0 0x400000000014d370 in ginChooseElem (accum=0x3, heapptr=0x18000000002, entries=0x1200000012, nentry=16384, low=2, high=16, offset=8192) at ginbulk.c:62 middle=Info: symbol middle is defined but not allocated (optimized away)
pos=Info: symbol pos is defined but not allocated (optimized away)
#1 0x400000000014cd00 in ginChooseElem (accum=0x3, heapptr=0x18000000002, entries=0x1200000012, nentry=16384, low=2, high=16, offset=8192) at ginbulk.c:168 middle=Info: symbol middle is defined but not allocated (optimized away)
pos=Info: symbol pos is defined but not allocated (optimized away)
#2 0x400000000014c790 in ginInsertRecordBA (accum=0x3, heapptr=0x18000000002, entries=0x1200000012, nentry=16384) at ginbulk.c:192 i=Info: symbol i is defined but not allocated (optimized away)
nbit=Info: symbol nbit is defined but not allocated (optimized away)
offset=Info: symbol offset is defined but not allocated (optimized away)
#3 0x4000000000123380 in ginBuildCallback (index=0x3, htup=0x18000000002, values=0x1200000012, isnull=0x4000 , tupleIsAlive=2 '\002', state=0x1800000010) at gininsert.c:203
---Type to continue, or q to quit--- buildstate=Info: symbol buildstate is defined but not allocated (optimized away)
oldCtx=Info: symbol oldCtx is defined but not allocated (optimized away)
#4 0x4000000000174ee0 in IndexBuildHeapScan (heapRelation=0x3, indexRelation=0x18000000002, indexInfo=0x1200000012, callback=0x4000, callback_state=0x18000000002) at index.c:1534 OldestXmin=Info: symbol OldestXmin is defined but not allocated (optimized away)
econtext=Info: symbol econtext is defined but not allocated (optimized away)
estate=Info: symbol estate is defined but not allocated (optimized away)
heapTuple=Info: symbol heapTuple is defined but not allocated (optimized away)
isnull={0 '\000', -6 '\372', 3 '\003', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 96 '', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 96 '', 66 'B', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 48 '0', -57 '\307', 65 'A', 0 '\000'} predicate=Info: symbol predicate is defined but not allocated (optimized away)
reltuples=Info: symbol reltuples is defined but not allocated (optimized away)
---Type to continue, or q to quit--- scan=Info: symbol scan is defined but not allocated (optimized away)
slot=Info: symbol slot is defined but not allocated (optimized away)
snapshot=Info: symbol snapshot is defined but not allocated (optimized away)
values={2305843009223818252, 6917529027642707624, 6917529027642654720, 0, 6917529027642679968, 0, 0, 4294967295, 2742, 2742, 2742, 1, 6917546619819731008, 2305843009220667000, 0, 12884901968, 0, 0, 18682901579169792, 6917546619819729920, 18714993574805504, 51539607576, 1, 6917546619819725504, 6917546619819729976, 6917529027642707624, 6917529027641342608, 10814, 46445776340607, 49152, 0, 0}
#5 0x4000000000124ea0 in ginbuild (fcinfo=0x3) at gininsert.c:311 buffer=Info: symbol buffer is defined but not allocated (optimized away)
entry=6917546615532235008 heap=Info: symbol heap is defined but not allocated (optimized away)
index=Info: symbol index is defined but not allocated (optimized away)
indexInfo=Info: symbol indexInfo is defined but not allocated (optimized away)
list=Info: symbol list is defined but not allocated (optimized away)
---Type to continue, or q to quit--- nlist=1624648 oldCtx=Info: symbol oldCtx is defined but not allocated (optimized away)
reltuples=Info: symbol reltuples is defined but not allocated (optimized away)
result=Info: symbol result is defined but not allocated (optimized away)
#6 0x40000000006eaf00 in OidFunctionCall3 (functionId=3, arg1=1649267441666, arg2=77309411346, arg3=16384) at fmgr.c:1460 result=Info: symbol result is defined but not allocated (optimized away)
#7 0x4000000000177390 in reindex_relation (relid=3, toast_too=2 '\002') at index.c:1282 doneIndexes=Info: symbol doneIndexes is defined but not allocated (optimized away)
indexId=Info: symbol indexId is defined but not allocated (optimized away)
indexIds=Info: symbol indexIds is defined but not allocated (optimized away)
is_pg_class=Info: symbol is_pg_class is defined but not allocated (optimized away)
rel=Info: symbol rel is defined but not allocated (optimized away)
---Type to continue, or q to quit--- result=Info: symbol result is defined but not allocated (optimized away)
toast_relid=Info: symbol toast_relid is defined but not allocated (optimized away)
#8 0x4000000000172700 in index_create (heapRelationId=3, indexRelationName=0x18000000002 , indexRelationId=18, indexInfo=0x4000, accessMethodObjectId=2, tableSpaceId=16, classObjectId=0x2000, reloptions=1649267441666, isprimary=0 '\000', isconstraint=0 '\000', allow_system_table_mods=0 '\000', skip_build=0 '\000', concurrent=0 '\000') at index.c:782 heapRelation=Info: symbol heapRelation is defined but not allocated (optimized away)
i=Info: symbol i is defined but not allocated (optimized away)
indexRelation=Info: symbol indexRelation is defined but not allocated (optimized away)
indexTupDesc=Info: symbol indexTupDesc is defined but not allocated (optimized away)
namespaceId=Info: symbol namespaceId is defined but not allocated (optimized away)
pg_class=Info: symbol pg_class is defined but not allocated (optimized away)
---Type to continue, or q to quit--- shared_relation=Info: symbol shared_relation is defined but not allocated (optimized away)
#9 0x4000000000270df0 in DefineIndex (heapRelation=0x3, indexRelationName=0x18000000002 , indexRelationId=18, accessMethodName=0x4000 , tableSpaceName=0x18000000002 , attributeList=0x1800000010, predicate=0x2000, rangetable=0x18000000002, options=0x0, unique=0 '\000', primary=0 '\000', isconstraint=0 '\000', is_alter_table=0 '\000', check_rights=1 '\001', skip_build=0 '\000', quiet=0 '\000', concurrent=0 '\000') at indexcmds.c:440 accessMethodForm=Info: symbol accessMethodForm is defined but not allocated (optimized away)
accessMethodId=Info: symbol accessMethodId is defined but not allocated (optimized away)
amoptions=Info: symbol amoptions is defined but not allocated (optimized away)
classObjectId=Info: symbol classObjectId is defined but not allocated (optimized away)
heaprelid={relId = 0, dbId = 0} indexForm=Info: symbol indexForm is defined but not allocated (optimized away)
---Type to continue, or q to quit--- indexInfo=Info: symbol indexInfo is defined but not allocated (optimized away)
indexTuple=Info: symbol indexTuple is defined but not allocated (optimized away)
ixcnt=Info: symbol ixcnt is defined but not allocated (optimized away)
lc=Info: symbol lc is defined but not allocated (optimized away)
namespaceId=Info: symbol namespaceId is defined but not allocated (optimized away)
numberOfAttributes=Info: symbol numberOfAttributes is defined but not allocated (optimized away)
old_xact_list=Info: symbol old_xact_list is defined but not allocated (optimized away)
pg_index=Info: symbol pg_index is defined but not allocated (optimized away)
rel=Info: symbol rel is defined but not allocated (optimized away)
relationId=Info: symbol relationId is defined but not allocated (optimized away)
reloptions=Info: symbol reloptions is defined but not allocated (optimized away)
---Type to continue, or q to quit---
snapshot=Info: symbol snapshot is defined but not allocated (optimized away)
tablespaceId=Info: symbol tablespaceId is defined but not allocated (optimized away)
tuple=Info: symbol tuple is defined but not allocated (optimized away)
#10 0x400000000051b3b0 in ProcessUtility (parsetree=0x3, params=0x18000000002, dest=0x1200000012, completionTag=0x4000 ) at utility.c:789
No locals.
#11 0x4000000000518100 in PortalRunMulti (portal=0x3, dest=0x18000000002, altdest=0x1200000012, completionTag=0x4000 ) at pquery.c:1062 planlist_item=Info: symbol planlist_item is defined but not allocated (optimized away)
querylist_item=Info: symbol querylist_item is defined but not allocated (optimized away)
#12 0x4000000000516f90 in PortalRun (portal=0x3, count=1649267441666, dest=0x1200000012, altdest=0x4000, completionTag=0x18000000002 ) at pquery.c:700 result=Info: symbol result is defined but not allocated (optimized away)
saveActivePortal=Info: symbol saveActivePortal is defined but not allocated (optimized away)
---Type to continue, or q to quit---
saveActiveSnapshot=Info: symbol saveActiveSnapshot is defined but not allocated (optimized away)
saveMemoryContext=Info: symbol saveMemoryContext is defined but not allocated (optimized away)
savePortalContext=Info: symbol savePortalContext is defined but not allocated (optimized away)
saveQueryContext=Info: symbol saveQueryContext is defined but not allocated (optimized away)
saveResourceOwner=Info: symbol saveResourceOwner is defined but not allocated (optimized away)
saveTopTransactionContext=Info: symbol saveTopTransactionContext is defined but not allocated (optimized away)
saveTopTransactionResourceOwner=Info: symbol saveTopTransactionResourceOwner is defined but not allocated (optimized away)
---Type to continue, or q to quit---
#13 0x400000000050e770 in exec_simple_query (query_string=0x3 ) at postgres.c:1003 dest=Info: symbol dest is defined but not allocated (optimized away)
oldcontext=Info: symbol oldcontext is defined but not allocated (optimized away)
parsetree_item=Info: symbol parsetree_item is defined but not allocated (optimized away)
parsetree_list=Info: symbol parsetree_list is defined but not allocated (optimized away)
prepare_string=Info: symbol prepare_string is defined but not allocated (optimized away)
save_log_statement_stats=Info: symbol save_log_statement_stats is defined but not allocated (optimized away)
was_logged=Info: symbol was_logged is defined but not allocated (optimized away)
#14 0x400000000050bc20 in PostgresMain (argc=3, argv=0x18000000002, username=0x1200000012 ) at postgres.c:3263 am_superuser=Info: symbol am_superuser is defined but not allocated (optimized away)
---Type to continue, or q to quit---
ctx=Info: symbol ctx is defined but not allocated (optimized away)
dbname=Info: symbol dbname is defined but not allocated (optimized away)
debug_flag=Info: symbol debug_flag is defined but not allocated (optimized away)
errs=Info: symbol errs is defined but not allocated (optimized away)
firstchar=Info: symbol firstchar is defined but not allocated (optimized away)
flag=Info: symbol flag is defined but not allocated (optimized away)
guc_names=Info: symbol guc_names is defined but not allocated (optimized away)
guc_values=Info: symbol guc_values is defined but not allocated (optimized away)
gucsource=Info: symbol gucsource is defined but not allocated (optimized away)
input_message={data = 0x6000000000157908 "CREATE INDEX ii on array_index_op_test using gin(i);", len = 53, maxlen = 256, cursor = 53} local_sigjmp_buf={{__jmpbuf = {6917546619819733104, 2305843009220182528, 0, 2674341019124543, 0, 0, 0, 0, 4611686018432675632, 0, 0, 0, 0, 0, -4611686018427380546, 0, 5832833, 6917537823734097288, 0, 6917546619819733120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 691754661981---Type to continue, or q to quit---
9733935, 0, 0, 0, 0, 0, 2852126720, 65528, 0, 0}, __mask_was_saved = 1, __saved_mask = {__val = {18446744066192964099, 9223372036854775808, 4294967295, 9223372036854775808, 65553, 9223372036854775808, 65552, 9223372036854775808, 2305843009220667000, 0, 65598, 9223372036854775808, 65511, 0, 0, 0}}}} secure=Info: symbol secure is defined but not allocated (optimized away)
send_ready_for_query=0 '\000' stack_base=0 '\000' userDoption=Info: symbol userDoption is defined but not allocated (optimized away)
#15 0x400000000045fc20 in BackendRun (port=0x3) at postmaster.c:2848 ac=Info: symbol ac is defined but not allocated (optimized away)
av=Info: symbol av is defined but not allocated (optimized away)
i=Info: symbol i is defined but not allocated (optimized away)
maxac=Info: symbol maxac is defined but not allocated (optimized away)
protobuf="-v196608" secs=210294493 usecs=148189
#16 0x400000000045ea80 in ServerLoop () at postmaster.c:2485
---Type to continue, or q to quit--- last_touch_time=Info: symbol last_touch_time is defined but not allocated (optimized away)
later={tv_sec = 1156978893, tv_usec = 522831} nSockets=Info: symbol nSockets is defined but not allocated (optimized away)
now=Info: symbol now is defined but not allocated (optimized away)
readmask={fds_bits = {24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
#17 0x400000000045c310 in PostmasterMain (argc=3, argv=0x18000000002) at postmaster.c:950 i=Info: symbol i is defined but not allocated (optimized away)
opt=Info: symbol opt is defined but not allocated (optimized away)
status=Info: symbol status is defined but not allocated (optimized away)
userDoption=Info: symbol userDoption is defined but not allocated (optimized away)
#18 0x400000000035a0b0 in main (argc=3, argv=0x18000000002) at main.c:187
No locals.
PG was configured with ./configure --enable-cassert --enable-debug --prefix=$PWD/install CC='icc'
Intel compiler version l_cc_c_9.1.042 or l_cc_c_9.0.030.
I didn't succeed to get the error for the compilation without '-O2' flag
for the compiler (when I set CFLAGS to '-g' for example).
Regards, Sergey
*******************************************************************
Sergey E. Koposov
Max Planck Institute for Astronomy/Sternberg Astronomical Institute
Tel: +49-6221-528-349
Web: http://lnfm1.sai.msu.ru/~math
E-mail: math@sai.msu.ru
Re: GIN FailedAssertions on Itanium2 with Intel compiler
От:
"Sergey E. Koposov" <math@sai.msu.ru>
Дата:
On Sat, 2 Sep 2006, Bruce Momjian wrote: > Teodor Sigaev wrote: >>> What does that option do? Is it practical to enable it for the entire >>> backend? >> From docs: >> Disables inline expansion of standard library or intrinsic functions. >> >>> And isn't this a straightforward compiler bug they should be notified >>> about? >> What's a choice? Now I see 3: >> 1) -O1 >> 2) "volatile" >> 3) -nolib_inline >> >> IMHO, only -O1 is guarantee for other possible places... But I'm not familiar >> enough with such kinds of bugs. > > My guess is that the compiler writers saw you calling a libc function, > and assumed that library could not modify the file static variable, > forgetting that the libc function can call back into the original file. > > Can you detect the Itanium compiler and optimization levels via > preprocessor symbols, and test for that, and throw an #error? No, it's impossible. Unfortunately the __OPTIMIZE__ preproc. symbol of icc doesn't allow to distinguish between different optimization levels. (only between -O0 and anything else). Regards, Sergey ******************************************************************* Sergey E. Koposov Max Planck Institute for Astronomy/Sternberg Astronomical Institute Tel: +49-6221-528-349 Web: http://lnfm1.sai.msu.ru/~math E-mail: math@sai.msu.ru