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

Non-convergence with while(1) #9

Closed
kokke opened this issue Dec 3, 2018 · 2 comments
Closed

Non-convergence with while(1) #9

kokke opened this issue Dec 3, 2018 · 2 comments
Labels
C-bug Category: Bug

Comments

@kokke
Copy link

kokke commented Dec 3, 2018

Hi @arthaud

I have problems getting analysis to converge on this function:

uint32_t CLKPWR_GetCLK (uint8_t ClkType)
{
    switch(ClkType)
    {
        case CLKPWR_CLKTYPE_CPU:
            return SystemCoreClock;

        case CLKPWR_CLKTYPE_PER:
            return PeripheralClock;

        case CLKPWR_CLKTYPE_EMC:
            return EMCClock;

        case CLKPWR_CLKTYPE_USB:
            return USBClock;

        default:
            while(1); //error loop
    }
}

SystemCoreClock, PeripheralClock, EMCClock and USBClock are all uint32_t-variables.

I run IKOS like this:
ikos --entry-points=CLKPWR_GetCLK whole_program.bc

It seems the problem is with the while(1);-loop, since analysis converges immediately if I replace with assert(0);.

@arthaud
Copy link
Member

arthaud commented Dec 3, 2018

Thanks for reporting this.

It was due to an infinite loop in source_location(). This is now fixed.

@kokke kokke changed the title Non-converge with while(1) Non-convergence with while(1) Dec 3, 2018
@kokke
Copy link
Author

kokke commented Dec 3, 2018

Thanks for the vigilant support 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Bug
Projects
None yet
Development

No branches or pull requests

2 participants