Jump to content

SystemC 2.3 - Bug in "void circular_buffer<T>::resize( int size )"


Recommended Posts


   There seems to be a bug in the "void circular_buffer<T>::resize( int size)" function in include/tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/circular_buffer.h


The line "buf_clear( m_buf, (m_ri + i) % size );" should be changed to:

buf_clear ( m_buf, (m_ri + i) % this->size() );


In the original code the "size" is set to the new array size, which is not valid for freeing buffers from the old array. I encountered a segmentation fault with the original code.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...