x64:为什么这段代码会给我“地址边界错误”(x64: Why does this piece of code give me “Address boundary error”)
为什么以下x64程序集给我“地址边界错误”? 它只在我
call _print_string
后添加代码时才会发生。 我假设一些寄存器已被修改,但是一旦_print_string
函数返回它们不应该被还原吗?我正在使用Mac OS X.
obj_size = 8 .data hello_world: .asciz "hello world!" .text .globl _main _main: pushq %rbp movq %rsp, %rbp leaq hello_world(%rip), %rdi callq _print_string subq obj_size, %rsp movq 1, %rax movq %rax, obj_size(%rsp) addq obj_size, %rsp leave ret
而C程序是:
void print_string(char *str) { printf("%s\n", str); }
Why does the following x64 assembly give me "Address boundary error"? It only happens when I add code after
call _print_string
. I assume that some of the register have been modified but aren't they supposed to be reverted once the_print_string
function returns?I am using Mac OS X
obj_size = 8 .data hello_world: .asciz "hello world!" .text .globl _main _main: pushq %rbp movq %rsp, %rbp leaq hello_world(%rip), %rdi callq _print_string subq obj_size, %rsp movq 1, %rax movq %rax, obj_size(%rsp) addq obj_size, %rsp leave ret
And the C program is:
void print_string(char *str) { printf("%s\n", str); }
原文:https://stackoverflow.com/questions/43329760
最满意答案
如果未使用composer安装扩展,则必须将自动加载设置添加到项目的composer.json中。
"autoload": { "psr-4": { "Test\\Yourext\\": "web/typo3conf/ext/yourext/Classes" } }
然后你必须做一个作曲家更新或作曲家转储自动加载
If your extension is not installed with composer you have to add the autoload settings into the composer.json of the project.
"autoload": { "psr-4": { "Test\\Yourext\\": "web/typo3conf/ext/yourext/Classes" } }
Then you have to do a composer update or composer dump-autoload
相关问答
更多-
Typo3扩展,需要一些数据库列为大写(Typo3 extension which requires some database columns to be uppercase)[2023-08-07]
你需要提供一个映射。 查看示例的核心内容https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/extbase/ext_typoscript_setup.txt You need to provide a mapping. Check out the core for examples https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/extbase/ext_typoscri ... -
您可以使用扩展名“extension_builder”。 它生成(骨架)基于extbase /流体的扩展,并与TYPO3 6.0兼容(甚至在生成的扩展中使用命名空间,这仅在6.0中引入)。 如果您想构建流媒体/扩展程序扩展,您应该阅读本书以熟悉这些扩展。 在德国,它也可以作为平装本。 我不确定“kickstarter”扩展是否仍然有效,但它的最后更新是一个维护版本,使其在TYPO3 v4.6中工作,所以它很有可能。 You can use the extension "extension_builder". ...
-
如果未使用composer安装扩展,则必须将自动加载设置添加到项目的composer.json中。 "autoload": { "psr-4": { "Test\\Yourext\\": "web/typo3conf/ext/yourext/Classes" } } 然后你必须做一个作曲家更新或作曲家转储自动加载 If your extension is not installed with composer you have to add the autoload set ...
-
Kickstarter多年来一直被用来创建旧的学校扩展,因为几年来有创建扩展的新方法 - Extbase。 它使用MVC模式,基于FLOW3理念,因此它将在未来很长一段时间内使用。 使用最新版本的“Extension Builder”从存储库“kickstart”您自己的Extbase ext 编辑你需要花一些时间来学习它是如何工作的(尤其是存储库和模型),最好用少量字段创建一些简单的扩展,并尝试识别它的结构如何,你会很快熟悉。 然后使用Builder的“工作表视图 ”来“ 绘制 ”当前表的结构。 如果你仔 ...
-
当你配置 array( 'GETvar' => 'tx_news_pi1[action]', ), array( 'GETvar' => 'tx_news_pi1[controller]', ), 说,行动和控制器的变量通过。 追加一个valueMap和noMatch,你可以删除它们: array( 'GETvar' => 'tx_news_pi1[action]', 'valueMap' => array(), 'noMat ...
-
在TYPO3 7.6 LTS的核心文件中,数据库连接建立代码位于core / Classes / Database / DatabaseConnection.php中。 您不必创建此类的对象。 您可以从TYPO3 Globals Constant $ GLOBALS ['TYPO3_DB']获取数据库对象和连接参数。 请参阅点击此处 您可以使用此全局对象编写自定义mysql查询。 示例: $results = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows ( ...
-
检查模板文件名的首字母大写。 规则是,对于名为fooBarAction()动作,模板文件必须命名为FooBar.html Check so template filename has first letter uppercase. The rule is that for action named fooBarAction() template file must be named FooBar.html
-
如果您在typo3安装中创建了符号链接并且已经使用TYPO3版本8.7.x运行,则无需手动添加TYPO3源。 如果TYPO3版本在6.2.x运行,那么首先需要升级TYPO3版本7.6和TYPO3 8.7. 如果您的系统在6.2.x.运行,则无法升级Directly版本8.7 。 只需按照以下步骤操作即可。 登录TYPO3 BE并转到安装工具。 在重要操作中,您会看到“ 检查核心更新”按钮。 点击这里,在这里你可以找到最新的TYPO3版本。 下载最新的TYPO3版本。 单击将当前数据库与规范进行比较并更新ty ...
-
在https://docs.typo3.org/typo3cms/extensions/extension_builder/上有一个“ExtensionBuilder 7.6.0”手册。 There is an "ExtensionBuilder 7.6.0" manual at https://docs.typo3.org/typo3cms/extensions/extension_builder/ .
-
解决方案: index { queue { tx_myextension = 1 tx_myextension { fields { ... bild_stringS = FILES bild_stringS { references { ...