vaxocentrism
/
vak "
soh -
sen "
trizm / [
analogy with "
ethnocentrism "]
A notional
disease said to afflict C programmers who persist in coding
according to certain assumptions that are valid (
especially
under Unix )
on {
VAXen }
but false elsewhere .
Among these are :
1 .
The assumption that dereferencing a null pointer is safe
because it is all bits 0 ,
and location 0 is readable and 0 .
Problem :
this may instead cause an illegal -
address trap on
non -
VAXen ,
and even on VAXen under OSes other than BSD Unix .
Usually this is an implicit assumption of sloppy code
(
forgetting to check the pointer before using it ),
rather than
deliberate exploitation of a misfeature .
2 .
The assumption that characters are signed .
3 .
The assumption that a pointer to any one type can freely be
cast into a pointer to any other type .
A stronger form of
this is the assumption that all pointers are the same size and
format ,
which means you don '
t have to worry about getting the
casts or types correct in calls .
Problem :
this fails on
word -
oriented machines or others with multiple pointer
formats .
4 .
The assumption that the parameters of a routine are stored
in memory ,
on a stack ,
contiguously ,
and in strictly ascending
or descending order .
Problem :
this fails on many RISC
architectures .
5 .
The assumption that pointer and integer types are the same
size ,
and that pointers can be stuffed into integer variables
(
and vice -
versa )
and drawn back out without being truncated or
mangled .
Problem :
this fails on segmented architectures or
word -
oriented machines with funny pointer formats .
6 .
The assumption that a data type of any size may begin at
any byte address in memory (
for example ,
that you can freely
construct and dereference a pointer to a word -
or
greater -
sized object at an odd char address ).
Problem :
this
fails on many (
especially RISC )
architectures better optimised
for {
HLL }
execution speed ,
and can cause an illegal address
fault or bus error .
7 .
The (
related )
assumption that there is no padding at the
end of types and that in an array you can thus step right from
the last byte of a previous component to the first byte of the
next one .
This is not only machine -
but compiler -
dependent .
8 .
The assumption that memory address space is globally flat
and that the array reference "
foo [-
1 ]"
is necessarily valid .
Problem :
this fails at 0 ,
or other places on segment -
addressed
machines like Intel chips (
yes ,
segmentation is universally
considered a {
brain -
damaged }
way to design machines (
see
{
moby }),
but that is a separate issue ).
9 .
The assumption that objects can be arbitrarily large with
no special considerations .
Problem :
this fails on segmented
architectures and under non -
virtual -
addressing environments .
10 .
The assumption that the stack can be as large as memory .
Problem :
this fails on segmented architectures or almost
anything else without virtual addressing and a paged stack .
11 .
The assumption that bits and addressable units within an
object are ordered in the same way and that this order is a
constant of nature .
Problem :
this fails on {
big -
endian }
machines .
12 .
The assumption that it is meaningful to compare pointers
to different objects not located within the same array ,
or to
objects of different types .
Problem :
the former fails on
segmented architectures ,
the latter on word -
oriented machines
or others with multiple pointer formats .
13 .
The assumption that an "
int "
is 32 bits ,
or (
nearly
equivalently )
the assumption that "
sizeof (
int ) ==
sizeof (
long )".
Problem :
this fails on {
PDP -
11s }, {
Intel
80286 }-
based systems and even on {
Intel 80386 }
and {
Motorola
68000 }
systems under some compilers .
14 .
The assumption that "
argv []"
is writable .
Problem :
this
fails in many embedded -
systems C environments and even under a
few flavours of Unix .
Note that a programmer can validly be accused of vaxocentrism
even if he or she has never seen a VAX .
Some of these
assumptions (
especially 2 --
5 )
were valid on the {
PDP -
11 },
the
original {
C }
machine ,
and became endemic years before the VAX .
The terms "
vaxocentricity "
and "
all -
the -
world "
s -
a -
VAX
syndrome '
have been used synonymously .
[{
Jargon File }]
vaxocentrism : /
vak `
soh ·
sen ´
trizm /,
n . [
analogy with ‘
ethnocentrism ’]
A notional disease said to afflict C programmers who persist in coding according to certain assumptions that are valid (
esp .
under Unix )
on VAXen but false elsewhere .
Among these are :
The assumption that dereferencing a null pointer is safe because it is all bits 0 , and location 0 is readable and 0 . Problem : this may instead cause an illegal -address trap on non -VAXen , and even on VAXen under OSes other than BSD Unix . Usually this is an implicit assumption of sloppy code (forgetting to check the pointer before using it ), rather than deliberate exploitation of a misfeature . The assumption that characters are signed . The assumption that a pointer to any one type can freely be cast into a pointer to any other type . A stronger form of this is the assumption that all pointers are the same size and format , which means you don 't have to worry about getting the casts or types correct in calls . Problem : this fails on word -oriented machines or others with multiple pointer formats .The assumption that the parameters of a routine are stored in memory , on a stack , contiguously , and in strictly ascending or descending order . Problem :this fails on many RISC architectures . The assumption that pointer and integer types are the same size , and that pointers can be stuffed into integer variables (and vice -versa ) and drawn back out without being truncated or mangled . Problem : this fails on segmented architectures or word -oriented machines with funny pointer formats .The assumption that a data type of any size may begin at any byte address in memory (for example , that you can freely construct and dereference a pointer to a word - or greater -sized object at an odd char address ). Problem : this fails on many (esp . RISC ) architectures better optimized for HLL execution speed , and can cause an illegal address fault or bus error . The (related ) assumption that there is no padding at the end of types and that in an array you can thus step right from the last byte of a previous component to the first byte of the next one . This is not only machine - but compiler -dependent . The assumption that memory address space is globally flat and that the array reference foo [-1 ] is necessarily valid .Problem : this fails at 0 , or other places on segment -addressed machines like Intel chips (yes , segmentation is universally considered a brain -damaged way to design machines (see moby ), but that is a separate issue ).The assumption that objects can be arbitrarily large with no special considerations . Problem : this fails on segmented architectures and under non -virtual -addressing environments . The assumption that the stack can be as large as memory . Problem : this fails on segmented architectures or almost anything else without virtual addressing and a paged stack . The assumption that bits and addressable units within an object are ordered in the same way and that this order is a constant of nature . Problem : this fails on big -endian machines . The assumption that it is meaningful to compare pointers to different objects not located within the same array , or to objects of different types . Problem :the former fails on segmented architectures , the latter on word -oriented machines or others with multiple pointer formats . The assumption that an int is 32 bits , or (nearly equivalently )the assumption that sizeof (int ) ==sizeof (long ) . Problem : this fails on PDP -11s , 286 -based systems and even on 386 and 68000 systems under some compilers (and on 64 -bit systems like the Alpha , of course ). The assumption that argv [] is writable . Problem : this fails in many embedded -systems C environments and even under a few flavors of Unix . Note that a programmer can validly be accused of vaxocentrism even if he or she has never seen a VAX .
Some of these assumptions (
esp .
2 --
5 )
were valid on the PDP -
11 ,
the original C machine ,
and became endemic years before the VAX .
The terms vaxocentricity and all -
the -
world '
s -
a -
VAX syndrome have been used synonymously .
安裝中文字典英文字典查詢工具!
中文字典英文字典工具:
複製到剪貼板
英文字典中文字典相關資料:
shopify 独立站 . com 域名与 . shop 域名区别和影响大吗? - 知乎 shopify 独立站 com 域名与 shop 域名区别和影响大吗? 目前是一个 shop的域名,因为之前注册域名的时候 com不可用了,然后现在公司说最好是搞一个 com的,然后我去查了一下这个 com的域名也是要做s… 显示全部 关注者 17
store和shop的区别?_百度知道 store和shop的区别: 英国多用shop, 表示商店, 店铺之意。 主要看搭配: a sport shop, a fruit shop; a grocery store, a furniture store 在美国英语中store更表示'小店'的意思, 而英国表示'百货商店' 美国英语中百货商店则是Department Store store 1、Bombs were planted in stores in Manchester and Blackpool 炸弹被安放在曼彻斯特和
store和shop有什么区别?_百度知道 store和shop都可表示“商店”。 其区别在于: 1、shop 比 store 小。 store 比 shop 正规。 百货商场里有很多卖服装的小店 There are many clothing stores in the department shop。 2、shop在英国一般指零售商店,在美国还指专卖店,即出售固定商品的门市部。
苹果premium和shop的区别 - 百度知道 苹果premium和shop的区别? 1、经营方式不同:授权经销商、优质经销商多以品牌门店经营,而apple shop多以超市或卖场柜台经营,因此在选购时可以通过这两种途径购买。 2、授权不同:Apple优质经销商: 只是被苹果授权销售苹果产品的公司、商业集团。并不属于版苹权果。Apple Store (不是Apple Shop) 是属于
switch520最新的地址是什么? - 知乎 switch520最新的地址是什么呢?地址是520switch com 下面这篇文章介绍了相关的介绍啥的 switch520-大型switch游戏下载平台 - 知乎 (zhihu com) 现在比较常用的switch游戏下载方式有 任天堂游戏官网: Nintendo - Official Site: Consoles, Games, News, and More 速度稍微有些慢,可以等等 国外的两家很全的下载网站,不过需要外
sci-hub官网入口是什么? - 知乎 Sci-Hub 的入口会因域名封禁或技术调整而频繁变化,以下是截至 2025 年 7 月的最新可用入口及访问建议: 最新有效入口 官方镜像站点 https: sci-hub se https: sci-hub st https: sci-hub ren https: sci-hub shop https: sci-hub tw https: sci-hub ru https: sci-hub in 中国地区优化入口 https: sci-hub ac cn (文献小镇,整合 Sci-Hub
832扶贫采购平台官网 - 百度知道 832扶贫采购平台官网832扶贫采购平台官网的地址是https: www fupin832 com 。以下是关于832扶贫采购平台官网的详细介绍:指导部门
现在柚子社的官方补丁在哪里啊? - 知乎 知乎,中文互联网高质量的问答社区和创作者聚集的原创内容平台,于 2011 年 1 月正式上线,以「让人们更好的分享知识、经验和见解,找到自己的解答」为品牌使命。知乎凭借认真、专业、友善的社区氛围、独特的产品机制以及结构化和易获得的优质内容,聚集了中文互联网科技、商业、影视
App Store 为什么不叫 App Shop? - 知乎 有人说shop和store是英式和美式的区别,中学也是这么教的,实际上并不是那么回事。在美式英语里,shop是现做的,store是卖预制菜的地方。 我发现学英语真的是学着学着突然间顿悟,不用特别去研究就能不自觉悟出一些规律,能逻辑自洽地去解释一些以前无法理解的东西,当真去研究时,发现结论
生产调度问题Job-shop和Flow-shop问题的区别在哪? - 知乎 flow shop问题,n个工件在m台机器上加工,每个工件都要在m台机器上加工一次,并且每台机器上的工序,即加工顺序都是一样的。 如四个工件在第一台机器加工顺序为2134,那么在剩余m-1台机器上的工序必须严格保持2134的顺序。