Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

nasty bug

Dude__Rand
Beginner
526 Views

Hi, i recently have installed Intel system studio 19 update 3 to test it, and after doing some small projects and exploring I found one nasty bug that makes my test project on stall, I did try to go around the bug no luck.

The bug that is that some strings are not stored correctly, I don't know how rare is this bug.

//static CHAR szBasedNamesObject[] = "\\??\\BasedNamedObject\\";
//static VOLATILE CHAR szBasedNamesObject[] = "\\??\\BasedNamedObject\\";
static CONST CHAR szBasedNamesObject[] = "\\??\\BasedNamedObject\\";

BOOL
CheckInstance(VOID)
{
    DLOG1(DLG_FLT_INFO, "Checking instance");
    DLOG1(DLG_FLT_HIGHLIGHT, "You workin fam ? %s", szBasedNamesObject);
	printf("%s\n", szBasedNamesObject);

    DLOG1(DLG_FLT_INFO, "Done");

    return TRUE;
}

The string is stored as (PΣá6¿Ö!║æedObject\ instead of \??\BasedNamedObject\ the only way it would be stored correctly is if i make it const. If you are wondering if the function DLOG1 is the problem i checked with printf and with windbg to see if the problem is on mine side.

Here is the assembly:

003110a2 6854403100      push    offset slave!szBasedNamesObject (00314054)
003110a7 6850333100      push    offset slave!NtapiSyscallsX86+0x118 (00313350)
003110ac 6864333100      push    offset slave!NtapiSyscallsX86+0x12c (00313364)
003110b1 6806003f1e      push    1E3F0006h
003110b6 e8950a0000      call    slave!$DLogSendExLocal (00311b50)

and some windbg:

0:000:x86> da slave!szBasedNamesObject
00314054  "(P..6....!..edObject\."

I did try /Qstd=c99 and /Qstr=c11, also removing and adding /GF too see if this is the problem. Changing the string doesn't fix the problem or making it array of bytes too. I hope all the information needed is here. Overall great compiler and sorry for my bad english.

0 Kudos
3 Replies
Dude__Rand
Beginner
526 Views

correction: If you are wondering if the function DLOG1 is the problem I checked the string using printf and is the same result.

Again sorry for my bad english

0 Kudos
Viet_H_Intel
Moderator
526 Views

Does your test project work with Microsoft compiler? Can you provide us a stand alone test case to investigate?

 

0 Kudos
Dude__Rand
Beginner
526 Views

Sorry for not being active, the problem is with /Qipo and xilink, if I compile a file with /Qipo and use xilink seems to creates the problem, and there is no problem with microsoft compiler

0 Kudos
Reply