aboutsummaryrefslogtreecommitdiffstats
path: root/zahl (unfollow)
Commit message (Collapse)AuthorFilesLines
2026-02-15fix out of bounds read in zlsb()Valentina Demiciseaux1-4/+4
prev scales i from num chars -> num bits, then indexes with it, causing a page fault or reading garbage. scale i after the read instead. here is a reproducer #include <stdio.h> #include "libzahl/zahl.h" int main(void) { z_t x; zinit(x); zsetu(x, 1); zlsh(x, x, 2097153); printf("used chars: expect 32769, have %lu\n", x->used); size_t tz = zlsb(x); printf("tz: expect 2097153, have %lu\n", tz); }
2016-05-07Optimise libzahl_memcpy for clangMattias Andrée1-7/+38
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-05-07Some small improvementsMattias Andrée2-2/+3
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-05-07OptimisationsMattias Andrée3-62/+142
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-05-06Make zdiv and zmod (calls zdivmod) inlineMattias Andrée2-0/+18
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-05-06Make zmul and zsqr (calls low-level functions) inlineMattias Andrée1-0/+25
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-05-06Do not use explicit optimisation level on zsaveMattias Andrée1-1/+1
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-05-05OptimisationsMattias Andrée1-5/+1
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-05-05Optimise and use __ around all compiler extensionsMattias Andrée1-9/+13
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-05-05Rename zahl-{inlines,internals}.h => zahl/{inlines,internals}.hMattias Andrée2-0/+438
Signed-off-by: Mattias Andrée <maandree@kth.se>