标签: hexchat

比较一个已经空闲的指针调用UB吗?

这似乎是一个相当常见的模式,例如在hexchat中(可能无法编译,另请参阅插件文档.还请注意,这些文档hexchat_plugin_get_info尚未永久使用,因此我为了简单起见省略了它):

static hexchat_plugin *ph;
static int timer_cb(void *userdata) {
    if (hexchat_set_context(ph, userdata)) { /* <-- is this line UB? */
        /* omitted */
    }
    return 0;
}
static int do_ub(char *word[], char *word_eol[], void *userdata) {
    void *context = hexchat_get_context(ph);
    hexchat_hook_timer(ph, 1000, timer_cb, context);
    hexchat_command(ph, "close"); /* free the context - in practice this would be done by another plugin or by the user, not like this, but for the purposes of this example this …
Run Code Online (Sandbox Code Playgroud)

c undefined-behavior hexchat

8
推荐指数
1
解决办法
257
查看次数

在 Hexchat 或任何 IRC 客户端中,如果某个人不再在网络中,我如何查看我过去与该人的对话?

我相信我可以直接向任何姓名发送消息msg <nick> <message>,但是有没有办法实际查看我与该人的消息对话/历史记录?

irc hexchat

-1
推荐指数
1
解决办法
2141
查看次数

标签 统计

hexchat ×2

c ×1

irc ×1

undefined-behavior ×1