Hello,

I am facing a problem when using the Bit_array class. 

I have a class called L1Dir which contains the property freemask which is a Bit_array with L1_SIZE bits. I want to initialize every bit to value 1 in freemask. However, when I try to call freemask.set(0, L1Dir) outside of the L1Dir default constructor the following error is thrown: 'Genode::Bit_array_base::Invalid_index_access'.

I have tried changing the call to freemask.set(1,2) but I still get the same exception. I have also tried with freemask.get(...) and freemask.clear(...) with no success.

I have initialized freemask with enough space: 

Genode::Bit_array<L1_SIZE> freemask;

This leads me to believe that the problem has something to do with the underlying memory of Bit_array_base. If you know what I am doing wrong, please let me know!

Best,
Rumen


P.S. If you need more context, you can find the current state of my code here: https://github.com/rumenmitov/genode-squid/tree/a726c5da3099a7f5de1d4d3d98a59b3a77812000