w6a: raise symbol-name buffer cap 64->256 (M1 prep)

Dotted import paths lengthen mangled symbols; the assembler's
fixed symbol/TEXT/DATA name buffers must not silently truncate a
mangled name into a collision. Byte-id-neutral: no current symbol
reaches 63 chars. wwstage w6a already parses symbols via dynamic
dupstr, so no mirror cap exists there.
This commit is contained in:
2026-06-15 11:50:43 +09:00
parent 04d35c25c3
commit 64d6c15e41

View File

@@ -210,9 +210,9 @@ parse_operand(Asm *a, const char *s, Aoperand *out)
/* IDENT — register or symbol-or-label */
if (a_isidstart((unsigned char)*s)) {
char buf[64] = {0};
char buf[256] = {0};
int n = 0;
while (a_isidcont((unsigned char)*s) && n < 63) buf[n++] = *s++;
while (a_isidcont((unsigned char)*s) && n < 255) buf[n++] = *s++;
buf[n] = 0;
/* Optional `+disp` between the ident and `(SB)`. Used by
@@ -333,9 +333,9 @@ a_parse(Asm *a)
if (op == A_TEXT) {
/* TEXT name,$framesize */
char nbuf[64] = {0};
char nbuf[256] = {0};
int nn = 0;
while (*m && *m != ',' && nn < 63) nbuf[nn++] = *m++;
while (*m && *m != ',' && nn < 255) nbuf[nn++] = *m++;
prg->to.type = D_EXTERN;
prg->to.sym = strdup(nbuf);
if (*m == ',') {
@@ -347,9 +347,9 @@ a_parse(Asm *a)
} else if (op == A_DATA || op == A_DATAW) {
/* DATA name(SB),"escaped bytes" — read-only in .text
* DATAW name(SB),"escaped bytes" — writable in .data */
char nbuf[128] = {0};
char nbuf[256] = {0};
int nn = 0;
while (*m && *m != '(' && nn < 127) nbuf[nn++] = *m++;
while (*m && *m != '(' && nn < 255) nbuf[nn++] = *m++;
prg->to.type = D_EXTERN;
prg->to.sym = strdup(nbuf);
if (*m == '(') {