Skip to content

[BUG] Compilation error with g++ version 11.4.0 #12

@Arnab035

Description

@Arnab035

Describe the bug
Hello. Compiling scarab gives me errors like below:

scarab/src/bp/cbp_tagescl_64k.h: In member function ‘void SpeculativeStatesBase::init()’:
/home/mje6jj/scarab/src/bp/cbp_tagescl_64k.h:296:11: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘class cbp64_folded_history’; use assignment or value-initialization instead [-Werror=class-memaccess]
  296 |     memset(ch_i, 0, sizeof(ch_i));
      |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~

I am using g++ 11.4.0 version and ubuntu version 22.04.5 as my environment.

To Reproduce
Steps to reproduce the behavior:

  1. Run cd src && make

Expected behavior
Scarab should compile and build successfully.

Screenshots

Desktop (please complete the following information):

  • OS: Linux (Ubuntu)
  • Version : 22.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions