Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

崩溃问题以及语言切换 #1

Open
Zhaotianzheng opened this issue Jul 15, 2024 · 2 comments
Open

崩溃问题以及语言切换 #1

Zhaotianzheng opened this issue Jul 15, 2024 · 2 comments

Comments

@Zhaotianzheng
Copy link

httpd_t* httpd = httpd_create(port, 1);
我是64位的电脑,但是使用过程中发现这里的http_create展开之后的main_loop返回了32位的地址,看了汇编发现有个cltq指令做了强制转换,从而导致了后续的崩溃,因为地址已经不对了。
解决目前是通过直接包含如下头文件,从原理上来说应该是链接阶段因为这个函数没有声明所以导致了一些问题。
#include "base/main_loop.h"

此外想请教一个问题,我在vscode的插件里面设置中文的时候好像不生效,不知道应该怎么操作。。

@xianjimli
Copy link
Member

可能是没包含相应的头文件。如果一个函数没有声明,默认返回int类型,指针就变成了32位了。

@xianjimli
Copy link
Member

非常感谢,已修改。麻烦更新试试。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants