Change the GDS parser behavior to prevent dreal to coredump.
* Change: In <rds>, gds_parse & gds_error, if a layer whose index was not in the rds file was encountered, it was just discarted but the parsing did continue, resulting in a possibly incoherent RDS figure. Now we just stop the parsing and trigger the error mechanism returning a NULL pointer, which is then safely handled by <dreal>. Under dreal, the error messages could be retrieved from the transient log files /tmp/alliance_all_PID, which is removed when dreal close.
This commit is contained in:
parent
620d747763
commit
3e300dd1c3
|
@ -106,6 +106,9 @@ char *message;
|
|||
(void)fprintf(stderr, "Il faudrait peut-etre la finir...\n");
|
||||
pv_error.v_textp = (char *)NULL;
|
||||
break;
|
||||
case ELAYERUNDEF :
|
||||
(void)fprintf(stderr, "%s : There is no layer with such index in the technology (maybe wrong .rds file)\n", message);
|
||||
break;
|
||||
case ENOTHER :
|
||||
break;
|
||||
default :
|
||||
|
|
|
@ -46,14 +46,11 @@
|
|||
|
||||
/* erreurs specifiques aux parser/driver */
|
||||
|
||||
#define ENOCODE 101 /* Le code rencontre n'est pas reconnu.
|
||||
*/
|
||||
#define ENORELE 102 /* Le code existe bien mais correspond a une version trop recente du format d
|
||||
e stockage */
|
||||
/* (GDS2, CIF...), dans la version avec laquelle on travaille, ce code etait
|
||||
envisage */
|
||||
/* mais pas encore implemente.
|
||||
*/
|
||||
#define ENOCODE 101 /* Le code rencontre n'est pas reconnu. */
|
||||
#define ENORELE 102 /* Le code existe bien mais correspond a une version trop recente du format d e stockage */
|
||||
/* (GDS2, CIF...), dans la version avec laquelle on travaille, ce code etait envisage */
|
||||
/* mais pas encore implemente. */
|
||||
#define ELAYERUNDEF 103 /* There is no layer of this index in the technology. */
|
||||
#define ENOTHER 255 /* Any other (wierd !) error. */
|
||||
|
||||
/*********
|
||||
|
|
|
@ -713,7 +713,14 @@ FILE *fp;
|
|||
if (islittle())
|
||||
gds_layer = swaps(gds_layer);
|
||||
rds_layer = pv_gdslayer_to_symb(gds_layer);
|
||||
if (rds_layer == (char)-1) FLAG = -1;
|
||||
/*if (rds_layer == (char)-1) FLAG = -1;*/
|
||||
if (rds_layer == (char)-1) {
|
||||
pv_init_error();
|
||||
pv_error.v_error = ELAYERUNDEF;
|
||||
pv_error.v_textp = "(layer number)";
|
||||
pv_give_error("construit_rectangle");
|
||||
error = TRUE;
|
||||
}
|
||||
if (pv_gdslayer_iscon(gds_layer))
|
||||
rds_type = MBK_CONNECTOR_MASK;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue