Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault loading workspace wo readline support #1079

Closed
ssiccha opened this issue Jan 14, 2017 · 1 comment
Closed

Segfault loading workspace wo readline support #1079

ssiccha opened this issue Jan 14, 2017 · 1 comment
Labels
kind: bug: crash Issues describing bugs that cause GAP to crash, and PRs fixing them (used for release notes) kind: bug Issues describing general bugs, and PRs fixing them

Comments

@ssiccha
Copy link
Contributor

ssiccha commented Jan 14, 2017

I compiled GAP 4.8.6 wo readline support, saved a workspace, then recompiled GAP 4.8.6 with readline support. Starting GAP then yields a segfault. For a full run see below, the error is basically

Error, Record: '<rec>.CommandLineEditFunctions' must have an assigned value in
  SHELL( GetBottomLVars(  ), false, false, 3, true, prompt, function (  )
...

This could in principle lead to problems if users would want to share or send each other GAP-workspaces. ( Does anybody ever do this? )

Observed behaviour

Note that the banner says Libs used: gmp although this GAP version actually uses readline. (Hence the error I guess)

 ┌───────┐   GAP 4.8.6, 12-Nov-2016, build of 2017-01-12 17:56:36 (CET)
 │  GAP  │   http://www.gap-system.org
 └───────┘   Architecture: x86_64-pc-linux-gnu-gcc-default64
 Libs used:  gmp
 Loaded workspace: /home/sergio/.gap/emptyWorkspace
 Components: trans 1.0, prim 2.1, small* 1.0, id* 1.0
 Packages:   AClib 1.2, Alnuth 3.0.0, AtlasRep 1.5.1, AutPGrp 1.6, CRISP 1.4.4, Cryst 4.1.12, CrystCat 1.1.6, CTblLib 1.2.2, FactInt 1.5.3, FGA 1.3.1, 
             GAPDoc 1.5.1, IRREDSOL 1.3.1, LAGUNA 3.7.0, Polenta 1.3.7, Polycyclic 2.11, RadiRoot 2.7, ResClasses 4.5.0, Sophus 1.23, SpinSym 1.5, 
             TomLib 1.2.6, Utils 0.43
 Try '??help' for help. See also '?copyright', '?cite' and '?authors'
gap> Error, Record: '<rec>.CommandLineEditFunctions' must have an assigned value in
  SHELL( GetBottomLVars(  ), false, false, 3, true, prompt, function (  )                                                                                     
      if IsBound( OnGAPPromptHook) and IsFunction( OnGAPPromptHook )  then                                                                                    
          OnGAPPromptHook(  );                                                                                                                                
      else                                                                                                                                                    
          return;                                                                                                                                             
      fi;                                                                                                                                                     
      return;                                                                                                                                                 
  end, "*stdin*", "*stdout*", true ); at /opt/gap/gap4r8/lib/session.g:49 called from                                                                         
SESSION(  ); at /opt/gap/gap4r8/lib/session.g:70 called from                                                                                                  
<function "POST_RESTORE">( <arguments> )                                                                                                                      
 called from read-eval loop at line 1 of *stdin*                                                                                                              
you can 'return;' after assigning a value                                                                                                                     
brk> Error, Record: '<rec>.CommandLineEditFunctions' must have an assigned value in                                                                           
  res := SHELL( context, mayReturnVoid, mayReturnObj, 1, false, prompt, false, "*errin*", "*errout*", false ); at /opt/gap/gap4r8/lib/error.g:235 called from 
SHELL( GetBottomLVars(  ), false, false, 3, true, prompt, function (  )                                                                                       
      if IsBound( OnGAPPromptHook) and IsFunction( OnGAPPromptHook )  then                                                                                    
          OnGAPPromptHook(  );                                                                                                                                
      else                                                                                                                                                    
          return;                                                                                                                                             
      fi;                                                                                                                                                     
      return;                                                                                                                                                 
  end, "*stdin*", "*stdout*", true ); at /opt/gap/gap4r8/lib/session.g:49 called from                                                                         
SESSION(  ); at /opt/gap/gap4r8/lib/session.g:70 called from                                                                                                  
<function "POST_RESTORE">( <arguments> )                                                                                                                      
 called from read-eval loop at line 1 of *errin*                                                                                                              
you can 'return;' after assigning a value   

Expected behaviour

Copy and paste GAP banner (to tell us about your setup)

@ChrisJefferson
Copy link
Contributor

Workspaces are very sensitive to the same gap, compiled in the same way, with the same package versions, also compiled in the same way.

There is still a bug here -- we should report this fact more clearly when an incompatable workspace is loaded.

@fingolfin fingolfin added the kind: bug: crash Issues describing bugs that cause GAP to crash, and PRs fixing them (used for release notes) label Feb 12, 2017
@fingolfin fingolfin added the kind: bug Issues describing general bugs, and PRs fixing them label May 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug: crash Issues describing bugs that cause GAP to crash, and PRs fixing them (used for release notes) kind: bug Issues describing general bugs, and PRs fixing them
Projects
None yet
Development

No branches or pull requests

3 participants