Opened 14 years ago
Closed 14 years ago
#204 closed bug (fixed)
Crash in example part by callig ERROR
Reported by: | gorzel | Owned by: | hannes |
---|---|---|---|
Priority: | major | Milestone: | 3-1-1 |
Component: | singular-kernel | Version: | 3-1-0 |
Keywords: | Cc: | hannes |
Description
Wenn eine proc mittels ERROR austeigt, und diese proc von ihrem example part aufgerufen wird, so kommt es zum Absturz, wenn zuvor eine proc aufgerufen wurde, die ein poly zurueck gibt.
Die lokalen Objekte des example parts werden in dem Fall nicht geloescht.
Der Fehler ist sehr seltsam!
Hier die library bug.lib
version = "$Id: bug.lib,v 1.0 2010/02/19 q$"; category = "general"; info = " LIBRARY: bug.lib, Shows a bug with example AUTHOR: Christian Gorzel, University of Muenster email: gorzelc@math.uni-muenster.de PROCEDURES: callbug() shows an bug with example "; //////////////////////////////////////////////////////////// proc callbug(poly f) "USAGE: callbug(f); f poly RETURN: poly NOTE: EXAMPLE: example callbug; shows an example " { ERROR("cannot transform."); return(f); } example { "EXAMPLE:"; echo =2; int n = 123456789; ring r3 = 3,(x,y),dp; poly g = xy; callbug(g); } ///////////////////////////////////////////////////////////////
Nun der Aufruf:
LIB"bug.lib"; int i =1; proc callobj(def obj) {return(obj);} ; example callbug; listvar(); // local objects from example part no longer exist ; ring R=0,x,dp; example callbug; listvar(); // local objects from example part no longer exist ; callobj(x); example callbug; listvar(); // local objects from example part still exist ;
Die Ausgabe ist:
> LIB"bug.lib"; // ** loaded /home/gorzelc/bug.lib (1.0,2010/02/19) > int i =1; > proc callobj(def obj) {return(obj);} > ; > example callbug; // proc callbug from lib bug.lib EXAMPLE: int n = 123456789; ring r3 = 3,(x,y),dp; poly g = xy; callbug(g); ? cannot transform. ? leaving bug.lib::callbug ? leaving bug.lib::callbug > listvar(); // local objects from example part no longer exist // i [0] int 1 > ; > ring R=0,x,dp; > example callbug; // proc callbug from lib bug.lib EXAMPLE: int n = 123456789; ring r3 = 3,(x,y),dp; poly g = xy; callbug(g); ? cannot transform. ? leaving bug.lib::callbug ? leaving bug.lib::callbug > listvar(); // local objects from example part no longer exist // R [0] *ring // i [0] int 1 > ; > callobj(x); x > example callbug; // proc callbug from lib bug.lib EXAMPLE: int n = 123456789; ring r3 = 3,(x,y),dp; poly g = xy; callbug(g); ? cannot transform. ? leaving bug.lib::callbug ? leaving bug.lib::callbug ? return value depends on local ring variable (export missing ?) Singular : signal 11 (v: 3119/2010021205): current line:>> ERROR("cannot transform the polynomial.");<< Segment fault/Bus error occurred at 84f8406 because of c (r:1266589812) please inform the authors trying to restart... . listvar(); // local objects from example part still exist STDIN 15. listvar(); // local objects from example part still exist // r3 [1] *ring // n [1] int 123456789 // R [0] ring // i [0] int 1 > ; STDIN 16> ;
Beachte die zeile "export missing"
? leaving bug.lib::callbug ? return value depends on local ring variable (export missing ?) Singular : signal 11 (v: 3119/2010021205):
Desweiteren: Weshalb ergibt sich stets eine doppelte Meldung von
? leaving bug.lib::callbug ? leaving bug.lib::callbug
Attachments (2)
Change History (3)
Changed 14 years ago by
comment:1 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
return value filed was nor initialized for examples (they usually do not return anything).
Note: See
TracTickets for help on using
tickets.
bug.lib