Skip to content

Adding rule with more than 102 conditions: allocation error #26

@gianni4sec

Description

@gianni4sec

I'm trying to create a rule with 1000 conditions but I'm getting an error from the allocation in the arena implementation since the memory required by the 1000 conditions is bigger than the slabSize (40000 vs 4096). I'm currently getting a panic from here when calling AddRule with 1000 conditions:
https://github.com/inetaf/wf/blob/36129f591884d49e0132e70ff89d55cf05371409/malloc.go#L40-L43

I can contribute a pr for this but I was wondering what would be the best approach to solve my issue. Increase the slabSize? Make the slabSize customizable? Change Alloc to allow for allocating multiple slabs? Please let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions