Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault on malformed csv import #3987

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Segfault on malformed csv import #3987

monetdb-team opened this issue Nov 30, 2020 · 0 comments

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2016-04-21 14:26:35 +0200
From: anthonin.bonnefoy
To: MonetDB5 devs <>
Version: 11.21.13 (Jul2015-SP2)

Last updated: 2016-06-23 10:24:15 +0200

Comment 22077

Date: 2016-04-21 14:26:35 +0200
From: anthonin.bonnefoy

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Iceweasel/45.0
Build Identifier:

An "COPY INTO" of a malformed csv trigger a segfault.

Reproducible: Always

Steps to Reproduce:

  1. Create a test table
    CREATE TABLE test (a TEXT, b BIGINT);

  2. Create the csv file
    echo -n '"a\n"b"\t"c\nd"\n' > data.csv

  3. Import it
    mclient db -s "COPY INTO test FROM '$PWD/data.csv' DELIMITERS '\t','\n','"' NULL AS '';"

Actual Results:

A SIGSEGV with the given traceback:

(gdb) bt
0 0x00007f7b3d9fbd32 in SQLload_parse_line (task=0x7f7b351e9960, idx=0) at tablet.c:1089
1 0x00007f7b3d9fbfff in SQLworker (arg=0x7f7b351e9960) at tablet.c:1135
2 0x00007f7b3be510a4 in start_thread (arg=0x7f7b349ed700) at pthread_create.c:309
3 0x00007f7b3bb8687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Comment 22078

Date: 2016-04-21 14:58:30 +0200
From: MonetDB Mercurial Repository <>

Changeset aedcd743f056 made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=aedcd743f056

Changeset description:

Add NULL pointer check.
This fixes bug #3987.

Comment 22079

Date: 2016-04-21 14:58:36 +0200
From: MonetDB Mercurial Repository <>

Changeset df58cfe6f8b9 made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=df58cfe6f8b9

Changeset description:

Added test for bug #3987.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant