summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/105/graphic/696834
blob: 2a32e578c7f1726e61b0279d4bc9558a41533808 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
graphic: 0.950
semantic: 0.945
other: 0.939
instruction: 0.925
assembly: 0.923
socket: 0.918
device: 0.916
vnc: 0.884
network: 0.880
boot: 0.868
mistranslation: 0.856
KVM: 0.723

FP exception reporting not working on NetBSD host

I recognize that NetBSD is not one of the officially supported host OS.  However, qemu 0.13.0 is available in the NetBSD pkgsrc collection, and works quite well.  Well, with one exception (pun intended): It seems that Floating Point exceptions don't get reported properly.

The following code-snippet demonstrates the problem:


volatile int flt_signal = 0;

static sigjmp_buf sigfpe_flt_env;
static void
sigfpe_flt_action(int signo, siginfo_t *info, void *ptr)
{
        flt_signal++;
}

void trigger(void)
{               
        struct sigaction sa;
        double d = strtod("0", NULL);
        
        if (sigsetjmp(sigfpe_flt_env, 0) == 0) {
                sa.sa_flags = SA_SIGINFO;
                sa.sa_sigaction = sigfpe_flt_action;
                sigemptyset(&sa.sa_mask);
                sigaction(SIGFPE, &sa, NULL);
                fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL|FP_X_IMP);
                printf("%g\n", 1 / d);
        }
        printf("FPE signal handler invoked %d times.\n");
}

On Mon, Jan 3, 2011 at 12:14 PM, Paul Goyette <email address hidden>wrote:

> Public bug reported:
>
> I recognize that NetBSD is not one of the officially supported host OS.
> However, qemu 0.13.0 is available in the NetBSD pkgsrc collection, and
> works quite well.  Well, with one exception (pun intended): It seems
> that Floating Point exceptions don't get reported properly.
>
> The following code-snippet demonstrates the problem:
>
>
> volatile int flt_signal = 0;
>
> static sigjmp_buf sigfpe_flt_env;
> static void
> sigfpe_flt_action(int signo, siginfo_t *info, void *ptr)
> {
>        flt_signal++;
> }
>
> void trigger(void)
> {
>        struct sigaction sa;
>        double d = strtod("0", NULL);
>
>        if (sigsetjmp(sigfpe_flt_env, 0) == 0) {
>                sa.sa_flags = SA_SIGINFO;
>                sa.sa_sigaction = sigfpe_flt_action;
>                sigemptyset(&sa.sa_mask);
>                sigaction(SIGFPE, &sa, NULL);
>                fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL|FP_X_IMP);
>                printf("%g\n", 1 / d);
>        }
>        printf("FPE signal handler invoked %d times.\n");
>

this printf() does miss an argument :-)


> }
>
> ** Affects: qemu
>     Importance: Undecided
>         Status: New
>
> --
> You received this bug notification because you are a member of qemu-
> devel-ml, which is subscribed to QEMU.
> https://bugs.launchpad.net/bugs/696834
>
> Title:
>  FP exception reporting not working on NetBSD host
>
> Status in QEMU:
>  New
>
> Bug description:
>  I recognize that NetBSD is not one of the officially supported host OS.
>  However, qemu 0.13.0 is available in the NetBSD pkgsrc collection, and
> works quite well.  Well, with one exception (pun intended): It seems that
> Floating Point exceptions don't get reported properly.
>
> The following code-snippet demonstrates the problem:
>
>
> volatile int flt_signal = 0;
>
> static sigjmp_buf sigfpe_flt_env;
> static void
> sigfpe_flt_action(int signo, siginfo_t *info, void *ptr)
> {
>        flt_signal++;
> }
>
> void trigger(void)
> {
>        struct sigaction sa;
>        double d = strtod("0", NULL);
>
>        if (sigsetjmp(sigfpe_flt_env, 0) == 0) {
>                sa.sa_flags = SA_SIGINFO;
>                sa.sa_sigaction = sigfpe_flt_action;
>                sigemptyset(&sa.sa_mask);
>                sigaction(SIGFPE, &sa, NULL);
>                fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL|FP_X_IMP);
>                printf("%g\n", 1 / d);
>        }
>        printf("FPE signal handler invoked %d times.\n");
>

this printf() does miss an argument :-)


> }
>
>
>
>


On Mon, 3 Jan 2011, Paulo Cezar A Junior wrote:

<snip>

>>        printf("FPE signal handler invoked %d times.\n");
>
> this printf() does miss an argument :-)

Yes, it does.  The signal handler is also missing a line:

 	siglongjmp(sigfpe_flt_env, 1);

That's what I get for extracting bits&pieces of the larger test program. 
:)


The following is a complete, standalone test program:

 	#include <ieeefp.h>
 	#include <setjmp.h>
 	#include <signal.h>
 	#include <stdio.h>

 	volatile int flt_signal = 0;

 	static sigjmp_buf sigfpe_flt_env;
 	static void
 	sigfpe_flt_action(int signo, siginfo_t *info, void *ptr)
 	{

 		flt_signal++;
 		siglongjmp(sigfpe_flt_env, 1);
 	}
 	int main(int argc, void *argv[])
 	{
 		struct sigaction sa;
 		double d;

 		printf("Start\n");
 		if (sigsetjmp(sigfpe_flt_env, 0) == 0) {
 			sa.sa_flags = SA_SIGINFO;
 			sa.sa_sigaction = sigfpe_flt_action;
 			sigemptyset(&sa.sa_mask);
 			sigaction(SIGFPE, &sa, NULL);
 			fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL|FP_X_IMP);
 			d = 1.0 / strtod("0", NULL);
 		}
 		printf("FPE signal handler invoked %d times.\n");
 	}

Executing the program gives the following results:

 	# cc -o test test.c
 	# ./test
 	Start
 	FPE signal handler invoked 0 times.
 	#

On "real" hardware,

 	{225} cc -o test test.c
 	{226} ./test
 	Start
 	FPE signal handler invoked 1 times.
 	{227}


-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------

On Mon, 3 Jan 2011, Paul Goyette wrote:

> The following is a complete, standalone test program:
>
> 	#include <ieeefp.h>
> 	#include <setjmp.h>
> 	#include <signal.h>
> 	#include <stdio.h>
>
>        volatile int flt_signal = 0;
>
> 	static sigjmp_buf sigfpe_flt_env;
> 	static void
> 	sigfpe_flt_action(int signo, siginfo_t *info, void *ptr)
> 	{
>
> 		flt_signal++;
> 		siglongjmp(sigfpe_flt_env, 1);
> 	}
> 	int main(int argc, void *argv[])
> 	{
> 		struct sigaction sa;
> 		double d;
>
> 		printf("Start\n");
> 		if (sigsetjmp(sigfpe_flt_env, 0) == 0) {
> 			sa.sa_flags = SA_SIGINFO;
> 			sa.sa_sigaction = sigfpe_flt_action;
> 			sigemptyset(&sa.sa_mask);
> 			sigaction(SIGFPE, &sa, NULL);
> 			fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL|FP_X_IMP);
> 			d = 1.0 / strtod("0", NULL);
> 		}
> 		printf("FPE signal handler invoked %d times.\n");

And, of course, I still missed the extra agument:

                 printf("FPE signal handler invoked %d times.\n", flt_signal);


> 	}
>
> Executing the program gives the following results:
>
> 	# cc -o test test.c
> 	# ./test
> 	Start
> 	FPE signal handler invoked 0 times.
> 	#
>
> On "real" hardware,
>
> 	{225} cc -o test test.c
> 	{226} ./test
> 	Start
> 	FPE signal handler invoked 1 times.
> 	{227}
>
>
> -------------------------------------------------------------------------
> | Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
> | Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
> | Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
> | Kernel Developer |                          | pgoyette at netbsd.org  |
> -------------------------------------------------------------------------
>
> -- 
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/696834
>
> Title:
>  FP exception reporting not working on NetBSD host
>
> Status in QEMU:
>  New
>
> Bug description:
>  I recognize that NetBSD is not one of the officially supported host OS.  However, qemu 0.13.0 is available in the NetBSD pkgsrc collection, and works quite well.  Well, with one exception (pun intended): It seems that Floating Point exceptions don't get reported properly.
>
> The following code-snippet demonstrates the problem:
>
>
> volatile int flt_signal = 0;
>
> static sigjmp_buf sigfpe_flt_env;
> static void
> sigfpe_flt_action(int signo, siginfo_t *info, void *ptr)
> {
>        flt_signal++;
> }
>
> void trigger(void)
> {
>        struct sigaction sa;
>        double d = strtod("0", NULL);
>
>        if (sigsetjmp(sigfpe_flt_env, 0) == 0) {
>                sa.sa_flags = SA_SIGINFO;
>                sa.sa_sigaction = sigfpe_flt_action;
>                sigemptyset(&sa.sa_mask);
>                sigaction(SIGFPE, &sa, NULL);
>                fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL|FP_X_IMP);
>                printf("%g\n", 1 / d);
>        }
>        printf("FPE signal handler invoked %d times.\n");
> }
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/qemu/+bug/696834/+subscribe
>
> !DSPAM:4d21f0752341470756574!
>
>
>

-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------

LinkedIn
------------

   
Bug,

I'd like to add you to my professional network on LinkedIn.

- Paulo

Paulo Cezar
Platform Researcher and Developer at INdT 
São Paulo Area, Brazil

Confirm that you know Paulo Cezar
https://www.linkedin.com/e/-g11m92-go1e59vx-23/isd/2968180228/v_gmfnNW/


 
-- 
(c) 2011, LinkedIn Corporation

QEMU 0.13 is completely outdated nowadays - can you still reproduce this problem with the latest version of QEMU (currently version 2.8) ?

On Tue, 10 Jan 2017, Thomas Huth wrote:

> QEMU 0.13 is completely outdated nowadays - can you still reproduce this
> problem with the latest version of QEMU (currently version 2.8) ?

The test program running on qemu 2.8.0 now produces the expected results 
- 1 FP exception

You can close this bug.



+------------------+--------------------------+------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+


Thanks for verifying!