Skip to content
This repository was archived by the owner on Jan 26, 2021. It is now read-only.
This repository was archived by the owner on Jan 26, 2021. It is now read-only.

when I run the infer it will cause a segmentation fault #65

@AugustGgGreen

Description

@AugustGgGreen

when I check the code in data_block.cpp the offset_buffer length is max_num_document_

try{
        offset_buffer_ = new int64_t[max_num_document_];
        }
        catch (std::bad_alloc& ba) {
            Log::Fatal("Bad Alloc caught: failed memory allocation for offset_buffer in DataBlock\n");
        }

but when you use the offset_buffer_ just like this:

for (int32_t index = 0; index < num_document_; ++index)
        {
            documents_[index].reset(new Document(
                documents_buffer_ + offset_buffer_[index],
                documents_buffer_ + offset_buffer_[index + 1]));
        }

when I set the max_num_document equal to the num_documnet in the block file it will cause a error!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions