[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  SystemPerl
  Voneline
  WFH
General Info
  Papers

Issue #527

segmentation fault in Preproc.so

Added by sorin lazarescu 12 months ago. Updated 21 days ago.

Status:NotEnoughInfoStart date:06/28/2012
Priority:HighDue date:
Assignee:Wilson Snyder% Done:

0%

Category:-
Target version:-

Description

I am using Perl 5 version 16. This was compiled, installed and ran on a machine running RedHat 5.6 64 bit.

I have Verilog::Perl 3.315 installed.

The line $self->_open($filename); from the subroutine open in the file Preproc.pm causes a segmentation fault. I am attaching a valgrind trace that shows where the segmentation fault occurred. What could be causing this?

I would like to add that everything works fine if I use Perl 5.8.8 and Verilog::Perl 3.221.

valgrind.txt Magnifier (4 KB) sorin lazarescu, 06/28/2012 06:16 pm

History

#1 Updated by Wilson Snyder 11 months ago

  • Status changed from New to AskedReporter
  • Assignee set to Wilson Snyder

Sorry for the delay. Is the version of "flex" the same in both cases?

Based on the valgrind report, try this:

diff --git a/Preproc/VPreLex.l b/Preproc/VPreLex.l --- a/Preproc/VPreLex.l +++ b/Preproc/VPreLex.l @ -505,7 +505,8 @ void VPreLex::scanBytesBack(const string& str) { + if (!currentBuffer()) return ""; ssize_t left = (yy_n_chars - (yy_c_buf_p - currentBuffer()->yy_ch_buf)); if (left > 0) { // left may be -1 at EOS *(yy_c_buf_p) = (yy_hold_char); return string(yy_c_buf_p, left);

string VPreLex::currentUnreadChars() {
    // WARNING - Peeking at internals

#2 Updated by Wilson Snyder 21 days ago

  • Status changed from AskedReporter to NotEnoughInfo

Closing due to age / no response.

Also available in: Atom PDF