Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locking (and therefore SMP) is broken on 64-bit linux #6

Open
serguei-patchkovskii opened this issue Apr 30, 2021 · 0 comments
Open

Comments

@serguei-patchkovskii
Copy link
Member

In src.exec/dpexec/dxThreadMain.h, lock_type is defined as:

typedef volatile int lock_type

Then, throughout the code, it is used as:

DXlock(&lock,...)

where DXlock is defined (in src/exec/libdx/lock.c) as:

int DXlock(lock_type *l, int who) { struct _lock *_lock = *(struct _lock **)l;

So, we in fact cast an integer to a pointer - which does not work on 64-bit Linux, where an integer is still 32-bit.

Ooops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant