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

Add windows CI #64

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Add windows CI #64

wants to merge 7 commits into from

Conversation

digama0
Copy link
Member

@digama0 digama0 commented Feb 9, 2022

The tests fail with a segfault and BUG #1502 though, so I should probably procure a working windows system to test. I used tinycc on a windows VM without problems, so I'm not sure what's wrong with the CI version.

@digama0
Copy link
Member Author

digama0 commented Feb 9, 2022

Oh boy, this is going to take a while to fix. The assumption that sizeof(long) == sizeof(void *) is pretty deeply ingrained in the code for pntrString and nmbrString.

@wlammen
Copy link
Contributor

wlammen commented Feb 9, 2022

Yep I know. In the upcoming doxy description of metamath this is described as a bug. Affected is for example the structure nullPntrString. A partial solution is using a union { size_t, void* } Sizeof can be used with macros if I remember right, so the integer type whose size is just below the sizeof(void*) can be found with some macro tango.

For those interested: a pointer can have a so called segment prefix, so it is for example 48 bits wide. There is usually no integer type (long or long long) that has this weird bit width.

To be fair, segmented memory models are not found that often any more, instead the so called flat model is widely used now.

Maybe the config.h generated in the build process, has some useful information.

@digama0
Copy link
Member Author

digama0 commented Feb 9, 2022

I'm working on a refactor that instead assumes sizeof(void*) == sizeof(size_t). I am not so worried about uncommon architectures for which this assumption fails (in which case we would have to use uintptr_t instead), but win64 is not an out of date or out of support target.

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

Successfully merging this pull request may close these issues.

2 participants