Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(122)

Side by Side Diff: src/pkg/runtime/runtime.h

Issue 906041: code review 906041: runtime: turn divide by zero, nil dereference into panics (Closed)
Patch Set: code review 906041: runtime: turn divide by zero, nil dereference into panics Created 14 years, 12 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/runtime/linux/thread.c ('k') | test/recover3.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 /* 5 /*
6 * basic types 6 * basic types
7 */ 7 */
8 typedef signed char int8; 8 typedef signed char int8;
9 typedef unsigned char uint8; 9 typedef unsigned char uint8;
10 typedef signed short int16; 10 typedef signed short int16;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 int16 status; 191 int16 status;
192 int32 goid; 192 int32 goid;
193 uint32 selgen; // valid sudog pointer 193 uint32 selgen; // valid sudog pointer
194 G* schedlink; 194 G* schedlink;
195 bool readyonstop; 195 bool readyonstop;
196 bool ispanic; 196 bool ispanic;
197 M* m; // for debuggers, but offset not hard-coded 197 M* m; // for debuggers, but offset not hard-coded
198 M* lockedm; 198 M* lockedm;
199 void (*cgofn)(void*); // for cgo/ffi 199 void (*cgofn)(void*); // for cgo/ffi
200 void *cgoarg; 200 void *cgoarg;
201 int32 sig;
202 uintptr sigcode0;
203 uintptr sigcode1;
201 }; 204 };
202 struct M 205 struct M
203 { 206 {
204 // The offsets of these fields are known to (hard-coded in) libmach. 207 // The offsets of these fields are known to (hard-coded in) libmach.
205 G* g0; // goroutine with scheduling stack 208 G* g0; // goroutine with scheduling stack
206 void (*morepc)(void); 209 void (*morepc)(void);
207 void* morefp; // frame pointer for more stack 210 void* morefp; // frame pointer for more stack
208 Gobuf morebuf; // gobuf arg to morestack 211 Gobuf morebuf; // gobuf arg to morestack
209 212
210 // Fields not known to debuggers. 213 // Fields not known to debuggers.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 { 264 {
262 int32 flags; 265 int32 flags;
263 int8 *name; 266 int8 *name;
264 }; 267 };
265 enum 268 enum
266 { 269 {
267 SigCatch = 1<<0, 270 SigCatch = 1<<0,
268 SigIgnore = 1<<1, 271 SigIgnore = 1<<1,
269 SigRestart = 1<<2, 272 SigRestart = 1<<2,
270 SigQueue = 1<<3, 273 SigQueue = 1<<3,
274 SigPanic = 1<<4,
271 }; 275 };
272 276
273 // NOTE(rsc): keep in sync with extern.go:/type.Func. 277 // NOTE(rsc): keep in sync with extern.go:/type.Func.
274 // Eventually, the loaded symbol table should be closer to this form. 278 // Eventually, the loaded symbol table should be closer to this form.
275 struct Func 279 struct Func
276 { 280 {
277 String name; 281 String name;
278 String type; // go type string 282 String type; // go type string
279 String src; // src file name 283 String src; // src file name
280 Slice pcln; // pc/ln tab for this func 284 Slice pcln; // pc/ln tab for this func
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 580
577 Hchan* makechan(Type*, uint32); 581 Hchan* makechan(Type*, uint32);
578 void chansend(Hchan*, void*, bool*); 582 void chansend(Hchan*, void*, bool*);
579 void chanrecv(Hchan*, void*, bool*); 583 void chanrecv(Hchan*, void*, bool*);
580 void chanclose(Hchan*); 584 void chanclose(Hchan*);
581 bool chanclosed(Hchan*); 585 bool chanclosed(Hchan*);
582 int32 chanlen(Hchan*); 586 int32 chanlen(Hchan*);
583 int32 chancap(Hchan*); 587 int32 chancap(Hchan*);
584 588
585 void ifaceE2I(struct InterfaceType*, Eface, Iface*); 589 void ifaceE2I(struct InterfaceType*, Eface, Iface*);
OLDNEW
« no previous file with comments | « src/pkg/runtime/linux/thread.c ('k') | test/recover3.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b