logs archiveBotHelp.net / Freenode / #2f30 / 2015 / July / 18 / 2
Evil_Bob
lol
retard
i like __20h__ a lot
FRIGN
stateless: http://fsharpforfunandprofit.com/posts/introvert-vs-extrovert/
this guy has brain damage
k0ga
__20h__ I don't have any problem with this source :S
s/__20h__/Evil_Bob/
Evil_Bob
k0ga: tested on OpenBSD, it is more strict when using memory after free() and such
k0ga
Evil_Bob: I just have pushed several commits
can you send me the bt with this last version?
(your bt gives me locations that are not logical, like white lines)
Evil_Bob
ok will do
k0ga
I think popctx is clearer now
Evil_Bob
yea
btw in cc1/cc1.h INPUT_SIZE of 120 might be too short?
k0ga
yes, I put it because I wanted to be able of executing it in very restricted environmnts (z80 systems). But at this point is a non sense. The corect value is inc/sizes.h:LINESIZ
that in C89 is 509
I think in C99 is bigger
but I took the sizes from the c89 standard
fell free of removing INPUTSIZ and use LINESIZ instead
Evil_Bob
http://sprunge.us/eSiL
it crashed because the same name / symbol is used as argument somehow "n" in this case
it is very likely a use-after-free, but im not sure where, im guessing in:
12:59 < Evil_Bob> k0ga: not sure, but at http://git.suckless.org/scc/tree/cc1/symbol.c#n129 sym->hash = *h;
12:59 < Evil_Bob> at http://git.suckless.org/scc/tree/cc1/symbol.c#n77 it is free'd
k0ga
yes, yes
can you add a call to dumpstab in cpp.c:334
?
Evil_Bob
sure, hang on
k0ga
this function will show us the state of the symbol table
and we can use it to see where is the problem
(a kind of printf("pos1\n"); ... printf("pos2\n"); ...)
I think is related to the lines you are posting, but I don't know exactly how
the symbol table is a hash
but the symbols are also in a list (next pointer)
why?
because if I don't have the list of symbols I have to run over all the entries of the hash table each time popctx() is called
with the list I only have to run over it until I find a symbol whose context is smaller
Evil_Bob
yea it makes sense
k0ga
Evil_Bob: could you see something with dumpstab?
Evil_Bob
k0ga: yea, hope it helps: http://sprunge.us/RXSI
k0ga: hash("n") == 46 ;)
thats where it crashes on the second lookup when its stored already
k0ga
hash("n") ?
I think the problem is related you are using the same name of parameter in both cases
Evil_Bob
yea thats what i meant
can you reproduce the issue with: printf '#define t(n) 1\n#define t2(n) 2' | ./cc1 ?
k0ga
no
FRIGN
Evil_Bob: I think I see the issue
There is a bug in scc. Hope that helps
k0ga
xD
FRIGN: yeah, for sure that is due to strcpy :P
FRIGN
k0ga :P
I told ya
Evil_Bob
free(willy);
FRIGN
Evil_Bob: free(domz);
k0ga
Evil_Bob: can you put a call to sumpstab in cpp.c:341?
after popctx()
Evil_Bob
http://sprunge.us/jOgF
also did a bt after just in case ;)
when i comment the 2 free lines at http://git.suckless.org/scc/tree/cc1/symbol.c?id=df87966673d742ff64cdb500a30f49ee69718120#n92
it works
k0ga
it means that sym is not unlinked
Evil_Bob: remove the if
in the line 90
henriqueleng
su
k0ga
I don't have idea why this is if was put
but it is totally stupid
Evil_Bob
k0ga: i think it should be changed to if(sym->name) instead of sym->hash
because sym->name can be NULL
and so: hash(NULL)
am i wrong? :)
k0ga
Evil_Bob: you are rigth
NULL is used in temporal labels
newsym() for example
stmt.c:76
Evil_Bob
ah
k0ga
does it works?
Evil_Bob
k0ga: yea pushed
http://git.suckless.org/scc/commit/?id=d5065baafed6ee455fc43471085b899d6cf614a0
FRIGN
Evil_Bob: k0ga: hey, one question:
expr.c:555:1: error: expected identifier or '(' before 'typeof'
#
how do I solve this?
I suspect the compiler is nagging that the built-in typeof-function is "overwritten"
Evil_Bob
FRIGN: you should compile with make CFLAGS="-std=c99"
FRIGN
why is this not default?
Evil_Bob
in some environments it might be, dunno
FRIGN: which distro do you use?
FRIGN
Evil_Bob: Gent00
Evil_Bob
:)
FRIGN
Evil_Bob: k0ga: just as a sidenote, I'd really welcome if the build-system was similar to the othr projects with a config.mk and a suckless-style Makefile rather than this env.sh mess
Evil_Bob
yea i agree
k0ga
ok
the problem here was the portability
FRIGN
and when the build breaks without std=c99, then bloody add it as a default to config.mk ...
k0ga
with make it should work
FRIGN
you want people to use and test it
k0ga
(wait a moment my daughter is crying ...)
FRIGN
I don't think anybody would want to go through the trouble of finding out why the build fails :P
k0ga: just tell her that I'm a nice guy normally :P
« prev 1 2 3 4 next »