About: Undefined behavior     Goto   Sponge   NotDistinct   Permalink

An Entity of Type : owl:Thing, within Data Space : dbpedia.org associated with source document(s)
QRcode icon
http://dbpedia.org/describe/?url=http%3A%2F%2Fdbpedia.org%2Fresource%2FUndefined_behavior

In computer programming, undefined behavior (UB) is the result of executing a program whose behavior is prescribed to be unpredictable, in the language specification to which the computer code adheres. This is different from unspecified behavior, for which the language specification does not prescribe a result, and implementation-defined behavior that defers to the documentation of another component of the platform (such as the ABI or the translator documentation).

AttributesValues
rdf:type
rdfs:label
  • Undefiniertes Verhalten (de)
  • Comportamiento indefinido (es)
  • 未定義動作 (ja)
  • Comportamento indefinido (pt)
  • Undefined behavior (en)
  • Неопределённое поведение (ru)
  • Невизначена поведінка (uk)
  • 未定义行为 (zh)
rdfs:comment
  • Undefiniertes Verhalten beschreibt in der Informatik Code, dessen Verhalten nicht spezifiziert ist und deshalb von verschiedenen Implementierungen von Compilern unterschiedlich behandelt werden kann. Dies ist eine Eigenschaft einiger Programmiersprachen, wie beispielsweise C oder C++. Die Semantik bestimmter Operationen ist in den Standards dieser Sprachen nicht definiert, wodurch eine Implementierung davon ausgehen kann, dass diese Operationen im Normalfall nicht vorkommen. Dadurch stimmt das Verhalten der Implementierung in jedem Fall mit den Standards der Sprache überein. Es ist die Aufgabe des Programmierers, nie Code zu schreiben, der undefiniertes Verhalten auslöst. (de)
  • コンピュータプログラミングにおいて、未定義動作(英: undefined behavior, UB)とは、コンピュータ言語が準拠する言語仕様において動作が予測できないと規定されたプログラムを実行した結果のことである。これに対して、言語仕様が動作結果を規定せず、プラットフォーム上の別のコンポーネントのドキュメント(ABIやトランスレータドキュメントなど)が処理系の実装を規定する動作のことを(英: Unspecified behavior)と呼ぶ。 「未定義のコードを実行した結果コンパイラは何をしてもいい。鼻から悪魔が飛び出しても仕様に反しない」というcomp.std.cでの投稿から、C言語コミュニティではユーモアを込めて未定義動作のことを「鼻の悪魔(英: nasal demons)」と呼ぶことがある。 (ja)
  • Неви́значена поведі́нка (англ. undefined behavior) — властивість деяких мов програмування (найпомітніша в Сі) залишати результат деяких операцій невизначеним конкретно. Ця міра приводить до спрощення специфікації і деякого підвищення гнучкості подібних мов (що часто характеризуються відсутністю вбудованої перевірки на межі масиву тощо). Невизначену поведінку не слід плутати з неспецифікованою поведінкою (unspecified behavior), за якої специфікація дозволяє не будь-яку поведінку, а тільки обмежений діапазон варіантів реалізації. (uk)
  • Un comportamiento indefinido (undefined behavior en inglés) en programación se refiere a la operación cuyo comportamiento es arbitrario. En los lenguajes de programación en los que se han definido comportamientos indefinidos las implementaciones pueden asumir que las operaciones que provocan un comportamiento indefinido nunca ocurren. Esta suposición hace válidas varias transformaciones del programa o simplifica las pruebas de validez dándole flexibilidad a la implementación del lenguaje. Es responsabilidad del programador escribir código que nunca invoque comportamientos indefinidos, pero la implementación del lenguaje tiene permitido mostrar mensajes de diagnóstico cuando esto suceda. (es)
  • In computer programming, undefined behavior (UB) is the result of executing a program whose behavior is prescribed to be unpredictable, in the language specification to which the computer code adheres. This is different from unspecified behavior, for which the language specification does not prescribe a result, and implementation-defined behavior that defers to the documentation of another component of the platform (such as the ABI or the translator documentation). (en)
  • Na ciência da computação, comportamento indefinido é um recurso existente em algumas linguagens de programação, notoriamente na linguagem C. Para simplificar a especificação e permitir maior flexibilidade de implementação, as especificações determinam que o resultado de algumas operações é indefinido. Operações que não sejam explicitamente definidas por um padrão também são associadas a comportamento indefinido. (pt)
  • Неопределённое поведение (англ. undefined behaviour, в ряде источников непредсказуемое поведение) — свойство некоторых языков программирования (наиболее заметно в Си), программных библиотек и аппаратного обеспечения в определённых маргинальных ситуациях выдавать результат, зависящий от реализации компилятора (библиотеки, микросхемы) и случайных факторов наподобие состояния памяти или сработавшего прерывания. Другими словами, спецификация не определяет поведение языка (библиотеки, микросхемы) в любых возможных ситуациях, а говорит: «при условии А результат операции Б не определён». Допускать такую ситуацию в программе считается ошибкой; даже если на некотором компиляторе программа успешно выполняется, она не будет кроссплатформенной и может отказать на другой машине, в другой ОС или при дру (ru)
  • 在计算机程序设计中,未定义行为(英語:undefined behavior)是指执行某种计算机代码所产生的结果,这种代码在当前程序状态下的行为在其所使用的中没有规定。常见于翻译器对源代码存在某些假设,而执行时这些假设不成立的情况。 一些编程语言中,某些情况下存在未定义行为,以C和C++最为著名。在这些语言的标准中,规定某些操作的语义是未定义的,典型的例子就是程序错误的情况,比如越界访问数组元素。标准允许语言的具体实现做这样的假设:只要是符合标准的程序代码,就不会出现任何类似的行为。具体到 C/C++ 中,编译器可以选择性地给出相应的诊断信息,但没有对此的强制要求:针对未定义行为,语言实现作出任何反应都是正确的,类似于数字逻辑中的。虽然编译器实现可能会针对未定义行为给出诊断信息,但保证编写的代码中不引发未定义行为是程序员自己的责任。这种假设的成立,通常可以让编译器对代码作出更多优化,同时也便于做更多的编译期检查和静态程序分析。 有时候也可能存在对于未定义行为本身的限制性要求。例如,在CPU的指令集说明中可能将某些形式的指令定为未定义,但如果该CPU支持内存保护,说明中很可能会还会包含一条兜底的规则,要求任何用户态的指令都不会让操作系统的安全性受损;这样一来,在执行未定义行为的指令时,就允许CPU破坏用户寄存器,但不允许发生诸如切换到监控模式的操作。 (zh)
differentFrom
dcterms:subject
Wikipage page ID
Wikipage revision ID
Link from a Wikipage to another Wikipage
Link from a Wikipage to an external page
sameAs
Faceted Search & Find service v1.17_git139 as of Feb 29 2024


Alternative Linked Data Documents: ODE     Content Formats:   [cxml] [csv]     RDF   [text] [turtle] [ld+json] [rdf+json] [rdf+xml]     ODATA   [atom+xml] [odata+json]     Microdata   [microdata+json] [html]    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 08.03.3330 as of Mar 19 2024, on Linux (x86_64-generic-linux-glibc212), Single-Server Edition (61 GB total memory, 49 GB memory in use)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2024 OpenLink Software