~mcf

https://mforney.org

Trackers

~mcf/cproc

Last active 2 months ago

~mcf/x509cert

Last active 3 years ago

~mcf/dnssec-rr

Last active 4 years ago

~mcf/libtls-bearssl

Last active 5 years ago

~mcf/qbe

Last active 6 years ago

~mcf/oasis

Last active 6 years ago

~mcf/sbase

Last active 6 years ago

~mcf/samurai

Last active 6 years ago

#136 muon samu -j 0 unsupported (segfault) 2 months ago

Ticket created by ~mcf on ~lattis/muon

$ muon samu -j 0
Segmentation fault

ninja supports -j 0 to mean "start unlimited jobs in parallel", analogous to make -j. samurai sets buildopts.maxjobs = -1 in this case (e.g. SIZE_MAX).

However, since muon's samurai allocates all maxjobs upfront, this causes an attempted allocation of SIZE_MAX jobs. Even though samu_arena_alloc can't fail, SIZE_MAX * sizeof(jobs[0]) is larger than SIZE_MAX, so samu_reallocarray fails and returns NULL. Then, when samu_build() tries to access the NULL array, it crashes.

Here are some possible solutions:

  1. Don't support -j 0. I'm not convinced that unlimited parallelism is a good feature, so it's probably fine to not support it (change num < 0 to num <= 0 in samu_jobsflag()).
  2. Since muon samurai uses it's own job spawning code, it doesn't have to keep a pollfd array, so you could allocate the job structs separately and make jobs a linked list.

In either case, I think the fatal should be added back to samu_xreallocarray, since callers expect that it always succeeds.

#90 QBE Error: ssa temporary %.xxx is used undefined 2 months ago

Comment by ~mcf on ~mcf/cproc

This error indicates that the code had some read of a variable before it was initialized. While I think qbe should accept this, it usually indicates some sort of bug in the code. Here, it was due to some unused variable warning suppressions (void)key, prior to their initialization.

This is fixed in muon 0.4.0.

REPORTED RESOLVED NOT_OUR_BUG

#93 qbe:-:5858: invalid instruction type in truncd 2 months ago

Comment by ~mcf on ~mcf/cproc

Unfortunately, it seems that the attachment didn't make it's way to the issue. Could you upload it somewhere or email it to me personally?

#91 cproc does not support FAMs in a union 2 months ago

Comment by ~mcf on ~mcf/cproc

Thanks for reporting this. You're right that unions are allowed to contain structs with FAMs, I had misinterpreted the standard text.

It says

such a structure (and any union containing, possibly recursively, a member that is such a structure) shall not be a member of a structure or an element of an array

So while you can't have a struct containing a struct with a FAM, a union containing a struct with a FAM is fine. This should be fixed in a2ddee1be6.

REPORTED RESOLVED FIXED

#91 cproc does not support FAMs in a union 2 months ago

bug added by ~mcf on ~mcf/cproc

#88 Release VLA stack space when it goes out of scope 11 months ago

Comment by ~mcf on ~mcf/cproc

Nihal Jere referenced this ticket in commit 4f206ac.

#1 Variable-length arrays 11 months ago

Comment by ~mcf on ~mcf/cproc

Nihal Jere referenced this ticket in commit 4f206ac.

REPORTED RESOLVED IMPLEMENTED

#1 Variable-length arrays 11 months ago

qbe removed by ~mcf on ~mcf/cproc

#1 Variable-length arrays 11 months ago

Comment by ~mcf on ~mcf/cproc

Added #88 to track the VLA loop issue. For now, we will just ignore it to unblock VLA support.

#88 Release VLA stack space when it goes out of scope 11 months ago

qbe added by ~mcf on ~mcf/cproc