Commit graph

18 commits

Author SHA1 Message Date
Ori Bernstein 1787a8b990 acid: increase hash size (thanks jonas.amoson)
when loading large binaries such as netsurf, with many
symbols, our hash table fills up with collisions and
loading the symbol table gets very slow. Bumping it up
drops the time to lstk() in acid on netsurf from 4 minutes
to 8 seconds.
2021-01-05 19:37:26 -08:00
aiju 5dcb407add acid: provide hooks 'procattach' and 'dying' 2017-06-12 19:28:27 +00:00
aiju 7c62868a9f acid: always create proclist variable 2017-06-12 19:27:49 +00:00
aiju 0f653d0f29 acid: add getfields() builtin 2017-06-12 19:24:32 +00:00
cinap_lenrek f3b5bcffce acid: fix y.tab.h dependency for proc.$O 2016-12-15 22:08:57 +01:00
cinap_lenrek 79fbfbff48 acid: don't get fooled by spaces in convflt() 2016-05-01 21:52:34 +02:00
cinap_lenrek 4cb032442a acid: fix sysr1() stack corruption
the syscall stubs (for amd64) currently have a unconditional
spill of the first (register) argument to the stack.

sysr1 (and _nsec) are exceptional in that they do not
take any arguments, so the stub is writing unconditionally
to ther first argument slot on the stack.

i could avoid emiting the spill in the syscall stubs for
sysr1 but that would also break truss which assumes fixed
instruction sequence from stub start to the syscall number.

i'm not going to complicate the syscall stubs just for
sysr1 (_nsec is not used in 9front), but just add a dummy
argument to sysr1 definition that can receive the bogus
argument spill.
2014-09-22 23:07:59 +02:00
cinap_lenrek 16acf605e2 acid: make 'a' and 'A' format to have the same size as mach->szaddr
to make it easier to write portable acid code, we
introduce 'A' format in the same meaning as in db(1):

A    Print the value of dot in hexadecimal.  Dot is
     unaffected.

both 'a' (symbolic) and 'A' will both have 64 or 32 bit
size depending on the mach, so pointer array indexing
works the same.
2014-02-09 22:43:09 +01:00
cinap_lenrek 9d8f5a1466 acid: fix memory corruption due to gc
we cannot call gc() in execute() because it will gc
anonyous intermediate results which happens when we
construct a list and the elements are calculated by
calling a function thru ocall() which calls execute().

also, the _thiscmd symbol; which is used to keep
a reference to a statement so it wont get garbage
collected; does not work as yyparse() is recursive
(include statements).

we add execrec() function which *only* gets called from
yyparse() when evaluating a statement. it will
keep a stack on the _thiscmd symbol handling the yyparse()
recursion.

we also only call gc() in execrec() before calling
execute(). so execute() will never gc() while evaluating
a statement which prevents the intermediate results
from getting collected.
2014-02-09 01:37:05 +01:00
mischief ddd51650d8 acid: fix memory leak in fundefs (from 9atom) 2014-02-02 03:17:48 -08:00
mischief 08bb4afb52 acid: use correct print flags and casts for shorts in fmt 2014-02-01 12:14:30 -08:00
cinap_lenrek 5e2478ccbb acid: handle buffer overflow with ridiculous long symbol names (thanks mischief)
go seems to accidently creates ridiculous long symbol names
causing acid to crash.
2013-09-20 16:02:10 +02:00
cinap_lenrek dbc4833d10 acid: fix cvtitoa buffer overflow 2012-08-10 10:06:23 +02:00
cinap_lenrek f51aa49bb0 acid: fix format string bugs and comment line counting (from eriks patch/acid-nits patch) 2012-02-11 13:05:34 +01:00
aiju e88e6c9a3b acid: don't assume mips 2011-07-22 19:46:17 +02:00
aiju b2a8db846b acid: fixed $terminal handling 2011-07-22 11:41:31 +02:00
Taru Karttunen a9060cc06b Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
Taru Karttunen e5888a1ffd Import sources from 2011-03-30 iso image 2011-03-30 15:46:40 +03:00