-
Notifications
You must be signed in to change notification settings - Fork 2
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
andrewcmyers/master #5
base: master
Are you sure you want to change the base?
Conversation
npe9
commented
Aug 7, 2022
- Add missing prototypes.
- Check in config file for now. Should be autogenerated.
- Simple autoconf script.
- The actual configuration script
- Fix prototype
- Fix newlines
- Make PCLU driver program build again
- Don't assume . in path
- initial autotools support to make it easier to debug the compiler
Remove a lot of autoconfed stuff from git.
@andrewcmyers I got sick of futzing with the makefiles so I made an initial autotools setup to get the compiler building with common compilers and flags. Make sure I haven't messed up too much. This new setup allowed me to dig deeper into the problem. The relevant backtrace is:
It looks like the token stream is invalid (it's bombing out on |
Looks like the poison is here: https://github.com/npe9/pclu/blob/master/code/sysasm/Opt/_chan.c#L170 So the next hypothesis is that the mode isn't getting set correctly when the channel is being opened. Edit: a quick trip through the debugger confirms it. |
I may have changed line 172 because it was clearly bogus but maybe it was compensating for an error elsewhere. That !flags&1 is bad code but i think it causes rd to be set when the mode is read only. Note that ! has higher precedence than & |
The logic of this code is just wrong. You can't write stuff like (flags & O_RDWR). You might write (flags & O_ACCMODE) == O_RDWR, but the flags don't work the way this code seems to think they do. |