coolexp / redis

Automatically exported from code.google.com/p/redis
0 stars 0 forks source link

cmdTable sentinel is incorrect #21

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
lookupCommand checks for .name != NULL, but the last entry for cmdTable is
"". Trivial patch attached.

Original issue reported on code.google.com by realy...@gmail.com on 19 Mar 2009 at 10:09

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks! fixing this in SVN, I'm writing a regression test for the issue. I'm 
curious,
did you spot it because of a crash on unknown command or looking at the source 
code? :)

Original comment by anti...@gmail.com on 19 Mar 2009 at 10:20

GoogleCodeExporter commented 8 years ago
It crashed when running the "Non existing command" test from the testsuite.

Original comment by realy...@gmail.com on 19 Mar 2009 at 11:22

GoogleCodeExporter commented 8 years ago
ah ok, pretty strange that valgrind didn't reported this even running the full 
'make
test' under valgrind, so it didn't fixed before. Btw now it's fixed under SVN. 
Thanks
for the help. I'll probably release beta-9 tomorrow with just this fix since 
it's a
bit critical if the server can crash with the standard test.

Original comment by anti...@gmail.com on 19 Mar 2009 at 11:30

GoogleCodeExporter commented 8 years ago
I mean beta-8 :) not 9

Original comment by anti...@gmail.com on 19 Mar 2009 at 11:31

GoogleCodeExporter commented 8 years ago
... which is pretty much the same as the test you just added.

I bet the original test worked for you by fluke because whatever happened to be 
in
memory past the end of the array happened to be zeroes.

Original comment by realy...@gmail.com on 19 Mar 2009 at 11:48

GoogleCodeExporter commented 8 years ago
Oh weird that valgrind didn't catch it.

Original comment by realy...@gmail.com on 19 Mar 2009 at 11:49

GoogleCodeExporter commented 8 years ago
Yes sorry I removed the duplicated test, I added it by instinct since it was 
out of
my mental scheme that there was already a test about it and still the bug was 
there.
Now I removed the new test since it's absolutely useless. I'll close the bug 
only
after beta-7 will be deprecated and beta-8 released. Thanks again.

Original comment by anti...@gmail.com on 19 Mar 2009 at 11:54

GoogleCodeExporter commented 8 years ago

Original comment by anti...@gmail.com on 22 Mar 2009 at 3:12