Where can I find parser.yy, I think there's a bug in the current parser.cc related to config_strings

Asked by Cor Cornelisse on 2011-05-16


Really looks like a bug in parser.cc, replacing "yyvsp[(2)-(4)].server).port" with "(yyvsp[0].server).port" works like a charm. The lines of code in question are generated by parser.yy line 197/205.

Where can I find parser.yy??



I think something is wrong with the config_string parser, but I can't seem to find parser.yy in the source, only the generated output of yacc, which is not really useful. It looks like it defaults to the default port for each server added.

Compiling the below attached code
g++ -ggdb -I /opt/memcached/include -L /opt/memcached/lib -lmemcached -lmemcachedutil portbug.c

And running:
gdb ./a.out
break sleep
fr 1
print memc_connection_pool->master->servers[0]->port
print memc_connection_pool->master->servers[1]->port

Will show the port is set to the default port 11211, it looks like the parser is ignoring the additionally specified port. Is the parser/lexer source available somewhere?

Using the latest checkout (bzr branch lp:libmemcached)

#include <libmemcached/memcached.h>
#include <libmemcached/util/pool.h>

#include <stdio.h>
#include <unistd.h>

int main(int argc , char **argv)
    // Servers to connect to
    const char *config_string = "--server=localhost:11212 --server=localhost:11213 --pool-min=10 --pool-max=32";
    // Create a memcached connection pool
    memcached_pool_st *memc_connection_pool = memcached_pool(config_string, strlen(config_string));
    // Cleanup
    return 0;

Question information

English Edit question
libmemcached Edit question
No assignee Edit question
Last query:
Last reply:
Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Cor Cornelisse (corcornelisse) said : #2


Can you help with this problem?

Provide an answer of your own, or ask Cor Cornelisse for more information if necessary.

To post a message you must log in.