Skip to content

Fuzzing Crash: Missing cast kernel from decimal to bool during scalar_at #6349

@github-actions

Description

@github-actions

Fuzzing Crash Report

Analysis

Crash Location: vortex-array/src/compute/cast.rs:85

Error Message:

scalar_at:
  No compute kernel to cast array vortex.decimal with dtype decimal(1,-2) to bool

Stack Trace:

   3: invoke
             at ./vortex-array/src/compute/cast.rs:85:13
   4: invoke
             at ./vortex-array/src/compute/mod.rs:146:34
   5: cast
             at ./vortex-array/src/compute/cast.rs:47:10
   6: invoke
             at ./vortex-array/src/compute/cast.rs:93:12
   7: invoke
             at ./vortex-array/src/compute/mod.rs:146:34
   8: cast
             at ./vortex-array/src/compute/cast.rs:47:10
   9: execute
             at ./vortex-array/src/expr/exprs/cast.rs:102:17
  10: execute<vortex_array::expr::exprs::cast::Cast>
             at ./vortex-array/src/expr/vtable.rs:510:22
  11: execute
             at ./vortex-array/src/expr/scalar_fn.rs:133:30
  12: scalar_at
             at ./vortex-array/src/arrays/scalar_fn/vtable/operations.rs:32:38
  13: scalar_at<vortex_array::arrays::scalar_fn::vtable::ScalarFnVTable>
             at ./vortex-array/src/array/mod.rs:484:22
  14: scalar_at
             at ./vortex-array/src/array/mod.rs:208:23
  15: scalar_at
             at ./vortex-array/src/arrays/chunked/vtable/operations.rs:15:34

Root Cause: The fuzzer discovered a missing cast implementation from decimal to bool types. During a scalar_at operation on nested struct arrays containing decimal fields, the cast system attempts to convert a DecimalArray with dtype decimal(1,-2) to bool, but no compute kernel exists for this conversion.

The crash occurs when:

  1. scalar_at is called on a deeply nested ChunkedArray containing StructArrays
  2. One of the struct fields contains a DecimalArray with decimal(1,-2) dtype
  3. The scalar_at operation requires casting the decimal value to bool type
  4. The array is canonical (DecimalArray), so it attempts to find a cast kernel at vortex-array/src/compute/cast.rs:85
  5. No cast kernel exists for decimal→bool, triggering the error

Array Structure:

  • ChunkedArray (length 104) containing nested StructArrays
  • Struct fields with deeply nested structure: Struct(Struct(Decimal, Binary), Struct(Bool, Bool))
  • DecimalArray has dtype Decimal(precision=1, scale=-2, NonNullable)
  • Values stored as I8 type
Debug Output
FuzzArrayAction {
    array: ChunkedArray {
        dtype: Struct(
            StructFields {
                names: FieldNames([FieldName(""), FieldName("")]),
                dtypes: [
                    FieldDType {
                        inner: Owned(
                            Struct(
                                StructFields {
                                    names: FieldNames([FieldName(""), FieldName("")]),
                                    dtypes: [
                                        FieldDType {
                                            inner: Owned(
                                                Decimal(
                                                    DecimalDType {
                                                        precision: 1,
                                                        scale: -2,
                                                    },
                                                    NonNullable,
                                                ),
                                            ),
                                        },
                                        FieldDType {
                                            inner: Owned(Binary(NonNullable)),
                                        },
                                    ],
                                },
                                NonNullable,
                            ),
                        ),
                    },
                    FieldDType {
                        inner: Owned(
                            Struct(
                                StructFields {
                                    names: FieldNames([FieldName(""), FieldName("")]),
                                    dtypes: [
                                        FieldDType {
                                            inner: Owned(Bool(NonNullable)),
                                        },
                                        FieldDType {
                                            inner: Owned(Bool(NonNullable)),
                                        },
                                    ],
                                },
                                NonNullable,
                            ),
                        ),
                    },
                ],
            },
            NonNullable,
        ),
        len: 104,
        chunks: [
            StructArray {
                len: 40,
                fields: [
                    ChunkedArray {
                        chunks: [
                            StructArray {
                                fields: [
                                    ChunkedArray {
                                        chunks: [
                                            DecimalArray {
                                                dtype: Decimal(precision=1, scale=-2, NonNullable),
                                                values_type: I8,
                                                len: 5
                                            },
                                            DecimalArray { len: 5 },
                                            DecimalArray { len: 5 }
                                        ]
                                    },
                                    ...
                                ]
                            },
                            ...
                        ]
                    },
                    ...
                ]
            },
            ...
        ],
    },
}

Summary

Reproduction

  1. Download the crash artifact:

  2. Reproduce locally:

# The artifact contains array_ops/crash-57b2f0e482cd2161b3a6e10aa01e20813055cf97
cargo +nightly fuzz run -D --sanitizer=none array_ops array_ops/crash-57b2f0e482cd2161b3a6e10aa01e20813055cf97 -- -rss_limit_mb=0
  1. Get full backtrace:
RUST_BACKTRACE=full cargo +nightly fuzz run -D --sanitizer=none array_ops array_ops/crash-57b2f0e482cd2161b3a6e10aa01e20813055cf97 -- -rss_limit_mb=0

Auto-created by fuzzing workflow with Claude analysis

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug issuefuzzerIssues detected by the fuzzer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions