~mcf

https://mforney.org

Trackers

~mcf/cproc

Last active a month ago

~mcf/x509cert

Last active 3 months ago

~mcf/dnssec-rr

Last active 1 year, 2 months ago

~mcf/libtls-bearssl

Last active 1 year, 7 months ago

~mcf/qbe

Last active 2 years ago

~mcf/oasis

Last active 2 years ago

~mcf/sbase

Last active 2 years ago

~mcf/samurai

Last active 2 years ago

#73 Incomplete enum is not caught in struct field a month ago

Comment by ~mcf on ~mcf/cproc

Thanks for the report. This is fixed in eb4320fc.

I also added a few other checks to make sure that structs have at least one member and the flexible array member (if present) is last.

REPORTED RESOLVED FIXED

#6 Implement the preprocessor a month ago

Comment by ~mcf on ~mcf/cproc

Seems like an interesting project, but pp-1 is not a C preprocessor. Rather, it looks to be some sort of document templating program.

#65 Preprocess assembly inputs with `.S` extension 3 months ago

Comment by ~mcf on ~mcf/cproc

This was fixed in 28146f5e.

REPORTED RESOLVED FIXED

#44 gmnisrv: pollfd realloc or client disconnection invalidates past pollfd pointers 9 months ago

Comment by ~mcf on ~sircmpwn/gmni

Yes, I think that should work. You could also go further and keep a parallel array containing a linked list of free pollfd indices. When a client exits, just update its index in the free list with the previous head, and when you accept a new client, check if there are any free pollfds before reallocating the array. I'm not sure if the extra complexity is worth it over just scanning the array for a free index, though.

#18 Switch to some other TLS implementation 9 months ago

Comment by ~mcf on ~sircmpwn/gmni

I'm not sure if it meets your criteria, but I'd be interested in porting gmnisrv to bearssl.

#44 gmnisrv: pollfd realloc or client disconnection invalidates past pollfd pointers 9 months ago

Ticket created by ~mcf on ~sircmpwn/gmni

I noticed that if gmniserve ever has to realloc the fds array because it had over 1024 simultaneous clients, then all the pollfd pointers saved in client structs become invalid.

Additionally, if two clients (1 and 2) are being served simultaneously and then client 1 disconnects first, then client 2's pollfd is shifted earlier in the array, but its pollfd pointer is not updated.

The first issue can be solved by keeping track of array indices instead of pointers. To solve the second issue, upon client disconnection you could loop through all subsequent clients and adjust their pollfd index.

#72 __attribute__((packed)) 1 year, 1 month ago

Ticket created by ~mcf on ~mcf/cproc

#71 Prevent creation of value with no QBE representation (long double) 1 year, 3 months ago

Ticket created by ~mcf on ~mcf/cproc

Right now, cproc can segfault if it tries to call a function with a long double argument. We currently detect a missing representation when we try to emit it, but we should actually just prevent construction of a value with no QBE representation in the first place.

Another manifestation of this bug is if you try to call a function returning long double, ignoring the result. This should be a compile error, but cproc compiles it as if it were void.

funcinst currently uses repr == NULL for function calls to indicate that it has no return value, so we can't tell if we are calling a function with no return value, or the return value has no representation.

To fix this, perhaps we could add a special funccall function to create call instructions. There is already some call-specific code in funcinst, so this is probably the right thing to do.

#70 cproc -Dfoo=bar syntax is not supported 1 year, 3 months ago

on ~mcf/cproc

REPORTED RESOLVED INVALID

#70 cproc -Dfoo=bar syntax is not supported 1 year, 3 months ago

Comment by ~mcf on ~mcf/cproc

I'm guessing you had some other flag that was not supported. I've run into this occasionally, too, since cproc didn't make it clear which option was problematic. C compilers are typically passed a lot of options, which makes it difficult to figure it out by inspecting the full command.

I pushed a commit that should help with this.