- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[cpp]
#include <stdio.h>
static struct {
const char *s = "abcd";
} a;
int main() {
printf("%s", a.s);
}
[/cpp]
GCC works correctly on it, when exe produced by icc crashes.
ICC 13.1 on win.
There is too many fails with ICC and today none of my bugreports was fixed, it has awful support of C++11 features, also no information about next release of ICC, so i'm moving to GCC.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I written in title that it's C++11, so it's need to specify /Qstd=c++11.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know.
At first it was mistake(i'm sorry), i uses 13.1 compiler from the day when it was released.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi Sergey, hi Bert
i have the sample code compile on openSUSE 12.3 Linux,
with icc
linux-cuda:/ibm_supercomputing/testprg # icc -std=c++11 c_11.c
icc: command line warning #10370: option '-std=c++11' is not valid for C compilations
c_11.c(3): error: expected a ";"
const char *s = "abcd";
^
this error output, then i have compile with following statement:
icpc -std=c++0x c_11.c -o c11
and the result , no compile errors,
i use the 64 Bit Parallel Studio XE for Linux, Compiler Versions icc and icpc 13.1.0.20130121
best regards
Franz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sergey,
yes i have execute the testcase result is a segmentation fault , now i check it with debugger
best regards
Franz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks all.
I'll file a bug report for it. I checked with update3 on Windows, it still crash.
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sergey, Hi Bert
now i have compile the testcase with gcc/g++ 4.7.2 and 4.8.0 under openSUSE 12.3 64 Bit Linux no problems till compile but
the executable produce the same segmentation fault as the ICC/ICPC , now my opinon, nothing is perfect ,every software has bugs
but i have excelllent expierence with the INTEL, IBM and NVIDIA Developer support for performnce critical application on linux i allways use my
INTEL Parallel Studio XE 2013, i like it, on the most cases its the right solution under Linux
best Regards
Franz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sergey,
now the g++/gcc executable produce the SIGSEGV on folllow:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff72893a4 in __GI__IO_default_xsputn (f=0x7fffffffd260, data=<optimized out>, n=4)
at genops.c:476
476 *p++ = *s++;
the ICPC exec the SIGSEGV at:
Program received signal SIGSEGV, Segmentation fault.
strchrnul () at ../sysdeps/x86_64/strchrnul.S:33
33 movdqa (%rdi), %xmm0
i'm not a assembler specialist, but i diassemble or generate an assembler listing and inspect it
best Regards
Franz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>>33 movdqa (%rdi), %xmm0>>>
It looks like a rdi is containing a invalid source pointer.Can you inspect the memory content of rdi register?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like rdi register is containing a invalid source pointer.Can you inspect the content of rdi register?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi iliyapolak,
the content of the rdi register:
value Description
0x4006f9 4196089
best regards
Franz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi iliyapolak, hi sergey
in the strchrnu.S was the SIGSEGV produce
the statement on line 476
*p++ = *s++; is the reason
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you look in memory window to what values is this address 0x4006f9 initialized.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi iliyapolak, hi sergey
now the rdi register or the char pointer *p++ contents '/x' or '/d' depents on this for loop counter
for( i = count; --i >= 0; )
*p++ = *s++; this is the code sequence that crashed with SIGSEGV
before the char *p stores _IO_write_ptr which contains the value 4196089 dec or 0x4006f9
the loop counter i has the value /x
you have right the source pointer contains a invalid value
best reagrds
Franz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>>you have right the source pointer contains a invalid value>>>
It always pays off to learning some debugging magic:)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page