cancel
Showing results for 
Search instead for 
Did you mean: 

Strange ktn behaviour between gcc(64 bit) and clang(32 bit)

alikalan14
New Contributor

Hello, I have two different results between 64-bit GCC compiled code on RedHad7 and 32-bit Clang compiled code on RedHad6. The following code snippet has different behaviors.

K keys = ktn(KS, 10);

It is at the beginning of a function, so I did not paste other lines. When I debug with gdb, after execution of this line,

keys.r

becomes a huge number on GCC(64bit), e.g., 720889, while it is 0 on Clang(32bit).

I read the documentation and other messages here and added the following code before the ktn call to ensure, but it did not make a difference.

khp("", -1);

 

Do you know why I am having so different results from a basic line of code? Can it be a 32bit/64bit related issue? If so, could you please point out some reference pages to me?

 

1 ACCEPTED SOLUTION

No, I did not check any uninitialized value or something. My sentences are clear but I guess you wanted to ask to make sure, I got your point.

 

My problem got resolved after migrating, https://github.com/KxSystems/kdb/blob/master/c/c/k.h

This is a new version, we were using an older version.

View solution in original post

3 REPLIES 3

leades
Moderator Moderator
Moderator

Hello,

Thank you for sharing your query with us, we're working on feedback for you. 

Many Thanks,

Luke

Hello,

Reverting back with feedback:

Are you looking at an uninitialized value, prior to the ktn call vs after it? It has been checked in both gcc and clang, for 64 bit and 32 bit but it was not reproduced. If you still have a question about this, could you please post your code and session in full.

Many Thanks

Luke

No, I did not check any uninitialized value or something. My sentences are clear but I guess you wanted to ask to make sure, I got your point.

 

My problem got resolved after migrating, https://github.com/KxSystems/kdb/blob/master/c/c/k.h

This is a new version, we were using an older version.