⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 no.156.mils

📁 一个内存数据库的源代码这是服务器端还有客户端
💻 MILS
字号:
# >Number:         156# >Category:       Mserver# >Synopsis:       multiplex bug# >Confidential:   no# >Severity:       critical# >Priority:       high# >Responsible:    boncz (Peter Boncz)# >State:          open# >Class:          sw-bug# >Submitter-Id:   unknown# >Arrival-Date:   Mon Jun  8 14:53:01 1998# >Originator:     windhouw@cwi.nl# >Organization:# CWI# >Release:        980101# >Environment:# SunOS5.6# >Description:# Hoi,# # the following error occurs when I'm using the multiplex operation:# > GDKmalloc called with size 0# And the server is gone.# This happens when I've a multiplex operation in a inner loop. The second time# the loop comes to the inner loop, the multiplex operator recieves different data (garbage).# In mine orginal code there was an own module command as multiplex operation and there I# printed the recieved input values. These were really different in the second loop.# # Example script:# # 8<----# PROC extractBit(any theBitsets,any theBit,any theStr,any loop) : void {#         VAR res;#         IF (loop = false) {# printf("!Before multiplex operation\n");#                 res := [*](theBitsets,theBit);# printf("!After multiplex operation\n");#         } ELSE {#                 res := new(theBitsets.htype,int);#                 theBitsets@batloop {#                         VAR b := $t*theBit;#                         res.insert($h,b);#                 }#         }#         printf("%s keer\n",theStr);#         res.print;# }# # PROC bitsetHist(any theEnum,any theBitsets,any loop) : void {#         theEnum@batloop {#                 VAR c := extractBit(theBitsets,$h,$t,false);#         }# }# # VAR enum := new(int,str);# enum.insert(0,"nul");# enum.insert(1,"een");# enum.insert(2,"twee");# enum.insert(3,"drie");# enum.insert(4,"vier");# enum.insert(5,"vijf");# enum.print;# # VAR bitsets := new(oid,int);# bitsets.insert(oid(1),2);# bitsets.insert(oid(2),4);# bitsets.print;# # bitsetHist(enum,bitsets);# 8<----# # Output with multiplex operation# # 8<----# # Monet Database Server V4.0 (SunOS5.6) of Wed Jun  3 16:07:27 MET DST 1998# # Copyright (c) 1993-1998, CWI & SION. All rights reserved.# # loaded;# #---------------------------------## # module        | usage_count     ## #---------------------------------## [ "kernel",       1               ]# [ "arith",        1               ]# [ "bat",          1               ]# [ "algebra",      1               ]# [ "sys",          1               ]# [ "trans",        1               ]# # Try: modules;                - for other modules.#      ls;                     - for persistent bat listing.#      sigs("<module>")        - for available commands per module.#      help("<command>")       - for help one-liner for a command.# # #You are system administrator (adm)!# #-----------------## # BAT:    tmp_23  ## # (int)   (str)   ## #-----------------## [ 0,      "nul"   ]# [ 1,      "een"   ]# [ 2,      "twee"  ]# [ 3,      "drie"  ]# [ 4,      "vier"  ]# [ 5,      "vijf"  ]# #-----------------## # BAT:    tmp_24  ## # (oid)   (int)   ## #-----------------## [ 1@0,    2       ]# [ 2@0,    4       ]# !Before multiplex operation# !After multiplex operation# nul keer# #-----------------## # BAT:    tmp_46  ## # (oid)   (int)   ## #-----------------## [ 1@0,    0       ]# [ 2@0,    0       ]# !Before multiplex operation# GDKmalloc called with size 0# 8<----# # Output with batloop# # 8<----# # Monet Database Server V4.0 (SunOS5.6) of Wed Jun  3 16:07:27 MET DST 1998# # Copyright (c) 1993-1998, CWI & SION. All rights reserved.# # loaded;# #---------------------------------## # module        | usage_count     ## #---------------------------------## [ "kernel",       1               ]# [ "arith",        1               ]# [ "bat",          1               ]# [ "algebra",      1               ]# [ "sys",          1               ]# [ "trans",        1               ]# # Try: modules;                - for other modules.#      ls;                     - for persistent bat listing.#      sigs("<module>")        - for available commands per module.#      help("<command>")       - for help one-liner for a command.# # #You are system administrator (adm)!# #-----------------## # BAT:    tmp_23  ## # (int)   (str)   ## #-----------------## [ 0,      "nul"   ]# [ 1,      "een"   ]# [ 2,      "twee"  ]# [ 3,      "drie"  ]# [ 4,      "vier"  ]# [ 5,      "vijf"  ]# #-----------------## # BAT:    tmp_24  ## # (oid)   (int)   ## #-----------------## [ 1@0,    2       ]# [ 2@0,    4       ]# nul keer# #-----------------## # BAT:    tmp_46  ## # (oid)   (int)   ## #-----------------## [ 1@0,    0       ]# [ 2@0,    0       ]# een keer# #-----------------## # BAT:    tmp_46  ## # (oid)   (int)   ## #-----------------## [ 1@0,    2       ]# [ 2@0,    4       ]# twee keer# #-----------------## # BAT:    tmp_46  ## # (oid)   (int)   ## #-----------------## [ 1@0,    4       ]# [ 2@0,    8       ]# drie keer# #-----------------## # BAT:    tmp_46  ## # (oid)   (int)   ## #-----------------## [ 1@0,    6       ]# [ 2@0,    12      ]# vier keer# #-----------------## # BAT:    tmp_46  ## # (oid)   (int)   ## #-----------------## [ 1@0,    8       ]# [ 2@0,    16      ]# vijf keer# #-----------------## # BAT:    tmp_46  ## # (oid)   (int)   ## #-----------------## [ 1@0,    10      ]# [ 2@0,    20      ]setoid(oid(20000000));PROC extractBit(any theBitsets,any theBit,any theStr,any loop) : void {        VAR res;        IF (loop = false) {printf("!Before multiplex operation\n");                res := [*](theBitsets,theBit);printf("!After multiplex operation\n");        } ELSE {                res := new(theBitsets.htype(),int);                theBitsets@batloop() {                        VAR b := $t*theBit;                        res.insert($h,b);                }        }        printf("%s keer\n",theStr);        res.print();}PROC bitsetHist(any theEnum,any theBitsets,any loop) : void {        theEnum@batloop() {                VAR c := extractBit(theBitsets,$h,$t,loop);        }}VAR enum := new(int,str);enum.insert(0,"nul");enum.insert(1,"een");enum.insert(2,"twee");enum.insert(3,"drie");enum.insert(4,"vier");enum.insert(5,"vijf");enum.print();VAR bitsets := new(oid,int);bitsets.insert(oid(1),2);bitsets.insert(oid(2),4);bitsets.print();# with batloopbitsetHist(enum,bitsets,true);# with multiplexbitsetHist(enum,bitsets,false);quit();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -