Skip to content

Crash at strcpy_len () #7573

Closed
Closed

Description

@suyZhong

Describe the bug

The following test case crashed the monetdb server.

Reproduction steps

DROP TABLE IF EXISTS t0 CASCADE;
CREATE  TABLE  t0(c1 INTEGER);

INSERT INTO t0(c1) VALUES (-296623006);
INSERT INTO t0(c1) VALUES (NULL);
INSERT INTO t0(c1) VALUES (-1566205920);

SELECT * FROM t0 WHERE (NOT (((- 9223372036854775807))>((CASE t0.c1 WHEN t0.c1 THEN -1 END )))) UNION ALL SELECT * FROM t0 WHERE (NOT (NOT (((- 9223372036854775807))>((CASE t0.c1 WHEN t0.c1 THEN -1 END )))));

Expected behavior

No crash

MonetDB release

v11.52.0 (hg id: 99c072b)

Executables source

Self compiled and installed

Operating System

Ubuntu 22.04

Additional context

backtrace:

#0  0x00007f4178849580 in strcpy_len () from /usr/local/lib/libbat-11.52.0.so.29
#1  0x00007f417884aeff in MT_thread_setalgorithm () from /usr/local/lib/libbat-11.52.0.so.29
#2  0x00007f41781e1b02 in BATselect () from /usr/local/lib/libbat-11.52.0.so.29
#3  0x00007f41781e33aa in BATthetaselect () from /usr/local/lib/libbat-11.52.0.so.29
#4  0x00007f41796ea474 in ALGthetaselect2 () from /usr/local/lib/libmonetdb5-11.52.0.so.36
#5  0x00007f417956a611 in malCommandCall () from /usr/local/lib/libmonetdb5-11.52.0.so.36
#6  0x00007f417956da5f in runMALsequence () from /usr/local/lib/libmonetdb5-11.52.0.so.36
#7  0x00007f417957175e in DFLOWworker () from /usr/local/lib/libmonetdb5-11.52.0.so.36
#8  0x00007f417884b33f in thread_starter () from /usr/local/lib/libbat-11.52.0.so.29
#9  0x00007f4177da3ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#10 0x00007f4177e34a04 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100

Build from source https://www.monetdb.org/documentation-Aug2024/dev-guide/installation-from-source/#summary:

> docker exec -it monetdb-test mserver5 --version
MonetDB 5 server 11.52.0 (hg id: 99c072b) (64-bit, 128-bit integers)
This is an unreleased version
Copyright (c) 1993 - July 2008 CWI
Copyright (c) August 2008 - 2023 MonetDB B.V., all rights reserved
Visit https://www.monetdb.org/ for further information
Found 503.5GiB available memory, 128 available cpu cores
Libraries:
Compiled by: @d7c54f4ab5c5 (x86_64-pc-linux-gnu)
Compilation: /usr/bin/cc 
Linking    : /usr/bin/ld

Activity

  1. sjoerdmullender commented on Sep 2, 2024

    @sjoerdmullender
    Member

    Was already fixed in Aug2024 branch, now also in default branch.

  2. added
    bugSomething isn't working
    unreleasedFix/Enhancement for unreleased MonetDB versions
    and removed
    needs triageTo be triaged by MonetDB team
    on Sep 2, 2024
  3. added a commit that references this issue on Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingunreleasedFix/Enhancement for unreleased MonetDB versions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions