From commits-return-34201-archive-asf-public=cust-asf.ponee.io@nuttx.apache.org Thu Apr 22 18:21:51 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-ec2-va.apache.org (mxout1-ec2-va.apache.org [3.227.148.255]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id DE93B18063B for ; Thu, 22 Apr 2021 20:21:50 +0200 (CEST) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) with SMTP id 530E73FB12 for ; Thu, 22 Apr 2021 18:21:30 +0000 (UTC) Received: (qmail 96009 invoked by uid 500); 22 Apr 2021 18:21:30 -0000 Mailing-List: contact commits-help@nuttx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nuttx.apache.org Delivered-To: mailing list commits@nuttx.apache.org Received: (qmail 95975 invoked by uid 99); 22 Apr 2021 18:21:30 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2021 18:21:30 +0000 From: =?utf-8?q?GitBox?= To: commits@nuttx.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bincubator-nuttx=5D_v01d_commented_on_pull_request_?= =?utf-8?q?=233589=3A_Migrate_build_system_to_CMake?= Message-ID: <161911569010.15632.5345558830172464761.asfpy@gitbox.apache.org> Date: Thu, 22 Apr 2021 18:21:30 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit References: In-Reply-To: v01d commented on pull request #3589: URL: https://github.com/apache/incubator-nuttx/pull/3589#issuecomment-825081367 > > BTW, I'm currently trying to solve an issue with sim: my understanding is that up_head call's the host's setjmp/longjmp, but when inspecting this symbol from Make build, it appears it is renamed to NXsetjmp so it is using internal definition of setjmp. Isn't up_head.c the host interface to the simulator? Why is it using the simulated setjmp? Is the host's setjmp not usable for up_head? (I understand that the simulated nuttx internally provides its own mechanism for setjmp) > > I tried that many years ago. It would crash immediately. I forget the details, but as I recall, there are a couple of issues with with the host longjmp/setjmp for this usage. For one, the stack is encrypted for security reasons. I forget why this caused the crash, try it and see. > > Another problem is the the GNU/Linux setjmp/longjmp is tied into Linux signal handling in a way that makes it unsuitable for use in the simulation. > > For the simulation, you need a simple setup/longjmp that just saves the and restores the critical registers. Great, thanks for the explanation! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org