C memory object and value semantics : the space of de facto and ISO standards

نویسندگان

  • David Chisnall
  • Justus Matthiesen
  • Kayvan Memarian
  • Peter Sewell
  • Robert N. M. Watson
چکیده

2 Abstract Pointers 7 2.1 Pointer Provenance . . . . . . . . . . . . . 7 2.1.1 Q1. Must the pointer used for a memory access have the right provenance, i.e. be derived from the pointer to the original allocation (with undefined behaviour otherwise)? (This lets compilers do provenance-based alias analysis) . . 7 2.1.2 Q2. Can equality testing on pointers be affected by pointer provenance information? . . . . . . . . . . . . 10 2.1.3 GCC and ISO C11 differ on the result of a == comparison on a onepast pointer . . . . . . . . . . . . . 14 2.2 Pointer provenance via integer types . . . . 14 2.2.1 Q3. Can one make a usable pointer via casts to intptr t and back? . . 14 2.2.2 Q4. Can one make a usable pointer via casts to unsigned long and back? . . . . . . . . . . . . . . . . 14 2.2.3 Q5. Must provenance information be tracked via casts to integer types and integer arithmetic? . . . . . . . 16 2.2.4 Q6. Can one use bit manipulation and integer casts to store information in unused bits of pointers? . . . 21 2.2.5 Q7. Can equality testing on integers that are derived from pointer values be affected by their provenance? . . 22 2.3 Pointers involving multiple provenances . . 23 2.3.1 Q8. Should intra-object pointer subtraction give provenance-free integer results? . . . . . . . . . . . . . 23 2.3.2 Q9. Can one make a usable offset between two separately allocated objects by inter-object subtraction (using either pointer or integer arithmetic), to make a usable pointer to the second by adding the offset to the first? . . . . . . . . . . . . . . . 26 2.3.3 Q10. Presuming that one can have valid pointers with multiple provenances, does an inter-object pointer subtraction give a value with explicitly-unknown provenance or something more specific? . . . . . . 30 2.3.4 Q11. Is the XOR linked list idiom supported? . . . . . . . . . . . . . 32 2.3.5 Q12. For arithmetic over provenanced integer values, is the provenance of the result invariant under plus/minus associativity? . . . . . . 33 2.3.6 Multiple provenance semantics summarised . . . . . . . . . . . . . 35 2.4 Pointer provenance via pointer representation copying . . . . . . . . . . . . . . . . . 35 2.4.1 Q13. Can one make a usable copy of a pointer by copying its representation bytes using the library memcpy? 35 2.4.2 Q14. Can one make a usable copy of a pointer by copying its representation bytes (unchanged) in user code? 35 2.4.3 Q15. Can one make a usable copy of a pointer by copying its representation bytes by user code that indirectly computes the identity function on those bytes? . . . . . . . . . 36

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Declarative Semantics in Object-Oriented Software Development - A Taxonomy and Survey

One of the modern paradigms to develop an application is object oriented analysis and design. In this paradigm, there are several objects and each object plays some specific roles in applications. In an application, we must distinguish between procedural semantics and declarative semantics for their implementation in a specific programming language. For the procedural semantics, we can write a ...

متن کامل

On Estimating a De Facto Population and Its Components

Abstract. This paper deals with estimating a population that is largely defined by the fact that its size, composition, and distribution are not readily accessible from census data in the U.S. and the other countries that use the De Jure concept of population. The population in question is based on the De Facto concept, which involves the estimation of people where they are found rather than wh...

متن کامل

The Standards War Between ODF and OOXML: Does Competition Between Overlapping ISO Standards Lead to Innovation?

A strong belief exists that competition between de facto standards stimulates innovation and benefits consumers because it drives down the costs of products. The tenability of this belief, and its preconditions and limits, has been widely scrutinized. However, little has been written about competition between negotiated, de jure (i.e., committee) standards. Are competing de jure standards a goo...

متن کامل

Competing De Jure Standards, Good for Innovation?

There is a strong belief that competition between de facto standards stimulates innovation and benefits consumers because it drives down the costs of products. The tenability of this belief, its preconditions and limits have been widely scrutinized. However, little has been written about competition between negotiated, de jure standards. Are competing de jure standards a good thing? Blind (2008...

متن کامل

ارزیابی ریسک بهداشتی ناشی از مواجهه با ارتعاش تمام بدن با استفاده از استانداردهای ISO 2631-1 و BS 6841

Introduction: The most common standards being used for predicting the health risks of whole body vibrations are ISO 2631- and BS 6844, presenting frequency weighting anfd different coefficients for different sensivities in variuse axes. In yhis study, vibration was measured about 900 minutes on 9 trains in one of the active lines of tehran metro with the aim of comparing the mentioned standards...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2016