[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DECC |
Notice: | General DEC C discussions |
Moderator: | TLE::D_SMITH N TE |
|
Created: | Fri Nov 13 1992 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 2212 |
Total number of notes: | 11045 |
2090.0. "Another ACCVIO in compile." by CSC32::EHA (Flip) Tue Feb 11 1997 11:10
Hello,
I have a customer that is getting and ACCVIO on a compile with the
/DEBUG qualifier. The Compiler is, V5.5-002, on the Alpha VMS 6.2
machine. I am not sure what is causing the error, because I have not
traced the line(s) that are causing it. I do have an example code that
will reproduce the problem.
$ on warning then goto clean_up
$ create thread.c
#include <reentrancy.h>
#include <cma.h>
#include <cma_library.h>
#include <starlet.h>
#include <lib$routines.h>
#include <descrip.h>
#include <iodef.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
static cma_t_thread the_thread;
static cma_t_attr thread_atts;
static cma_t_start_routine rtn;
static cma_t_address arg = (void *)0;
static cma_t_exit_status exit_status;
static cma_t_address result;
static cma_t_date_time timer_expire;
static cma_t_interval ten_secs = 10;
static cma_t_cond cond_var;
static cma_t_mutex mutex_var;
static cma_lib_t_queue the_queue;
static cma_lib_t_attr queue_attr;
static $DESCRIPTOR(sysout, "SYS$OUTPUT");
static void *thread_routine();
static short thr_chan;
static int i;
int main()
{
int status;
short main_ef;
short chan;
char input[10];
decc$set_reentrancy(C$C_MULTITHREAD);
lib$get_ef(&main_ef);
status = sys$assign(&sysout, &chan, 0, 0, 0);
if (!(status & 1))
lib$stop(status);
status = sys$assign(&sysout, &thr_chan, 0, 0, 0);
if (!(status & 1))
lib$stop(status);
cma_init();
rtn = &thread_routine;
sys$qiow(main_ef, chan, IO$_WRITEVBLK,
0, 0, 0, "Creating queue\n\r", 16, 0, 0, 0, 0);
cma_lib_queue_create(&the_queue, &cma_c_null);
sys$qiow(main_ef, chan, IO$_WRITEVBLK,
0, 0, 0, "Creating attribute\n\r", 20, 0, 0, 0, 0);
cma_attr_create(&thread_atts, &cma_c_null);
cma_cond_create(&cond_var, &cma_c_null);
cma_mutex_create(&mutex_var, &cma_c_null);
sys$qiow(main_ef, chan, IO$_WRITEVBLK,
0, 0, 0, "Creating thread\r\n", 17, 0, 0, 0, 0);
cma_thread_create(&the_thread, &cma_c_null,
(cma_t_start_routine)&thread_routine, arg);
for (;;)
{
sys$qiow(main_ef, chan, IO$_READVBLK,
0, 0, 0, input, 10, 0, 0, 0, 0);
i = atoi(input);
if (i == 666)
{
cma_thread_alert(&the_thread);
break;
}
else
{
cma_lib_queue_enqueue(&the_queue, (void *)i);
}
}
sys$qiow(main_ef, chan, IO$_WRITEVBLK,
0, 0, 0, "Waiting for thread exit\n\r", 25, 0, 0, 0, 0);
cma_thread_join(&the_thread, &exit_status, &result);
return;
}
static void *thread_routine()
{
int queue_value;
short thread_ef;
char text[50];
lib$get_ef(&thread_ef);
for (; ;)
{
cma_t_status stat;
sys$qiow(thread_ef, thr_chan, IO$_WRITEVBLK,
0, 0, 0, "\rChecking queue\n\r", 17, 0, 0, 0, 0);
cma_lib_queue_dequeue(&the_queue, (void *)&queue_value);
sprintf(text, "\rYou sent %d\n", queue_value);
sys$qiow(thread_ef, thr_chan, IO$_WRITEVBLK,
0, 0, 0, text, strlen(text), 0, 0, 0, 0);
}
return;
}
$ cc/pref=all thread/noopt/list
$ link thread,sys$input/opt
sys$share:cma$open_rtl/share
sys$share:cma$open_lib_shr/share
$!
$ cc/pref=all thread/noopt/list/debug
%SYSTEM-F-ACCVIO, access violation, reason mask=04, virtual address=7E4E3F00, PC=00179E28, PS=0000001B
Improperly handled condition, image exit forced.
Signal arguments: Number = 00000005
Name = 0000000C
00000004
7E4E3F00
00179E28
0000001B
Register dump:
R0 = 0000000000000000 R1 = 0000000000000007 R2 = 0000000000017A40
R3 = 0000000000000000 R4 = 0000000000582E98 R5 = 0000000000000000
R6 = 0000000000000000 R7 = 0000000000585318 R8 = 0000000000585370
R9 = 000000007E4E42E2 R10 = 000000000053EB68 R11 = 000000007E4E42E0
R12 = 0000000001228093 R13 = 000000000055C168 R14 = 000000000055C168
R15 = 000000007EF0DDA0 R16 = 00000000005852E0 R17 = 000000000058E278
R18 = 0000000000000000 R19 = 0000000000582E98 R20 = 0000000000179E20
R21 = 00000000000C3198 R22 = 0000000000585318 R23 = 000000000058E278
R24 = 000000000095D6C0 R25 = 0000000000000004 R26 = 000000000017A174
R27 = 0000000000017A40 R28 = 000000000017A158 R29 = 0000000080EAB200
SP = 000000007EE4C000 PC = 0000000000179E28 PS = 000000000000001B
$clean_up:
$ ver = f$verify(ver)
Thank you!
Al
T.R | Title | User | Personal Name | Date | Lines |
---|
2090.1 | duplicate of DECC_BUGS 1259? | TAVENG::BORIS | Boris Gubenko, ISE | Tue Feb 11 1997 12:07 | 0 |
2090.2 | Fixed by kit announced in 3.44 of this conference | CXXC::REPETE | Rich Peterson 381-1802 ZKO2-3/N30 | Tue Feb 11 1997 15:46 | 0
|